Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Instance closing script is executed for every ordinarily closed (by user action or deadline) workflow instance. The only exception is when the workflow is terminated by the administratoradministrator terminates the workflow. At that point, the script is not executed. However, you may use the Instance Termination Script to handle the termination events. 

Instance Closing Script may be useful to export process data to any external system.

In the script, you can use use the $Instance to  variable to get or set initiated instance properties.  The $Initiator variable specifies who initiated the workflow instance, but remember, this variable can be null for module type tasks. You can also refer to the right panel for the list of the available scripting objects. 

An important topic is that, unlike the task prework or postwork scripts, the $Xml/wiki/spaces/EMK/pages/9931091 variable is attached to the data model root element, not to the pool element.