Termination Script¶
The Instance Termination Script executes when a workflow instance is terminated (either administratively or by the system). This script is useful for reverting changes made by the Opening Script.
Any errors during script execution will abort the termination process, and all changes will be rolled back.
Scripting Context¶
The script provides access to:
$Instance
: For accessing and modifying workflow instance properties.$Initiator
: Identifies the workflow initiator. This can benull
for module-type tasks.$Xml
: Accesses the data model's root element ( unlike task pre/post work scripts, which access the pool element).
Note
The $Xml
variable's context differs from task pre/post-work scripts; it references the data model's root, not the pool element.