Choosing Workflow Events
Sometimes the most difficult aspect of programming is determining the appropriate event to use to trigger a procedure. In a workflow process, events govern workflow activities and are used to trigger script. There are seven workflow actions to choose from: Create, Delete, Enter, Exit, Change, Receive, and Expiry.
Each workflow event has a validation function. If this validation returns False, then the event is canceled, and any script associated with the event is not triggered. If the validation returns True, then the event is committed, and the associated script is executed.
When writing script for workflow events, you must be familiar with the available events and the order in which they are executed. In addition, it is critical to understand how these events loop and the consequences of changing the names of script procedures.
Workflow Event Order
Understanding the order of workflow events is important, because it affects how and when your script runs. For example, if you have two script procedures that are meant to execute in a certain order, it is important you add them to the appropriate events, so the procedures are triggered in the correct sequence.
The workflow engine determines the order in which workflow events are triggered. The workflow engine evaluates the different event types in a particular order. For instance, if you have a Change event and an Exit event for a state and both associated conditions are True, the workflow engine executes the Exit event before proceeding with the Change event.
See Also
Scripting in the Workflow Designer for Exchange Server | Creating Script Procedures | Workflow Process Security Mode | Debugging Script in the Workflow Designer for Exchange Server | Script Examples for Exchange Server | Order of Workflow Events | Workflow Scripting | Security Checklist | Setting the Security Mode