Prework script scripts are commonly used to control process data or task state before assign it's assigned to the users.
Prework script defined area is reached from a related task. When you click on the "Prework script" button on the task, the prework script page will open.
In the prework script following objects are available;:
$WorkItem
Current workitem instance.
$Xml
Xml XML data navigator for data model
$WorkItem
Current workitem instance.
$Instance
Current workflow instance..
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Common operations
Auto Process Task
Automatically process processes the current work item, without assign assigning it to the users, and skip skips to the next step in of a workflow.
Code Block | ||||
---|---|---|---|---|
| ||||
$WorkItem.SelectedAction = 'Approve'; |
Dynamic Deadline Date
Set Sets deadline date by user-entered data.
Code Block | ||||
---|---|---|---|---|
| ||||
$WorkItem.DeadlineDate = $Xml.EvaluateEvaluateDateTime('PaymentDate'); |