Thursday, 17 July 2008

[Workflow] Accept Code of Transition

The Accept Code of a transition is executed as a just-in-time call in the environment of the workflow engine when the transition is followed. It should return M4_SUCCESS; if it returns M4_ERROR, the workflow engine stops with an error.

It can be used to e.g. assign a value to a BPC variable, issue a message or cancel a transition.

Example: Issue warning message that includes the Person ID.
//Workflow for 0%:s instantiated
SetLog(M4_WARNINGLOG, 18, xx, yy, SWF_INST_DATA.Get(“ID_PERSON”))
Return(M4_SUCCESS)

Where xx and yy indicate the sub-module and number of the message to be issued.

No comments: