Opening Script¶
The Instance Opening Script executes when a new workflow instance is initiated. This script is useful for setting dynamic default values (e.g., assigning the current date to a form field).
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.