Assigning pre- and post-execution scripts
To specify attributes and conditions for the execution of an activity or event in a client-side human service or service flow, you can assign pre-execution and post-execution scripts to a specified activity or event node. The JavaScript code that you add as pre- and post-execution scripts runs immediately before or after the activity or event runs.
About this task
In a client-side human service or service flow, you can add pre- and post-execution scripts to all activities and event nodes that support the pre- and post-execution script function. For example, start nodes support pre- and post-execution scripts in client-side human services but not in service flows, while end nodes support pre- and post-execution scripts in both client-side human services and service flows.
In the script editor, use standard JavaScript syntax to add the appropriate pre- or post-execution JavaScript code.
When you add the scripts to a postpone event, the event runs the pre- and post-execution scripts before saving the execution context and before navigating to the specified URL. Similarly, the end event in a root client-side human service that is used as a task runs both the pre- and post-execution scripts before returning the control to the BPD.
Procedure
To assign a pre-execution or post-execution script to an activity or event in a client-side human service or service flow: