Writing scripts for Workflow events
Each action consists of scripted events that determine what the user can do and how the user input is processed by the system. For example, if a user processing a formula approval workflow is asked to view the formula, then select Approve
or Reject
. This action contains the VIEW
, APPROVE
and REJECT
events, even though only two of the three events occur.
Selecting a button of the same name as the event in the user interface activates the scripted event; and it instructs the system to open a Formula form, approve the formula or reject the formula. This collection of events constitutes one action.
They can be scripted as shown in the table.
Event | Script |
---|---|
VIEW |
Opens the Formula form and instructs the system to advance to the next event.
|
APPROVE |
Shows this message to the user and instructs the system to advance to the next action.
|
REJECT |
Shows this message to the user and instructs the system to cancel the workflow.
|
COMPLETE |
All events except APPROVE , with return code 111 or 811, also trigger the COMPLETE event.
Return 111 instructs the workflow engine to finish the current event and then process the If you do not want to process the
See Return codes. |
Write scripts in the Script tab of the Action form.

Return codes conclude each event and instruct the system to move forward, pause or cancel the workflow.