Task Prework Script
Prework scripts are commonly used to control process data or task state before 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 data navigator for data model.
$Instance $Initiator $TestMode $Priority $Culture /wiki/spaces/EMK/pages/9930714 $Database
Current workflow instance.
Initiator of the workflow instance.
A boolean value that specifies the current workflow instance is in test mode.
A value between 0 to 5 specifies the priority of the workflow instance.
A string value that specifies the initiated culture of the workflow instance. (Example: "en" or "de" or "tr")
Translation dictionary that provides localized texts.
Provides methods to query relational database.
$Membership $Calendar $XmlRepository $Domain $Services $Messages $Crypto $Delegation $Files $Documents
Provides methods to access the organization database.
Provides methods for time based calculations and working hours calendar.
Provides methods to query non-relational databases.
Allows accessing domain preferences.
Allows accessing defined web services.
Allows sending email messages.
Performs cryptographic and digital signature operations.
Allows accessing user delegation library.
Allows accessing file repository.
Allows accessing document repository.
Common operations
Auto Process Task
Automatically processes the current work item, without assigning it to the users, and skips to the next step of a workflow.
$WorkItem.SelectedAction = 'Approve';
Dynamic Deadline Date
Sets deadline date by user-entered data.
$WorkItem.DeadlineDate = $Xml.EvaluateDateTime('PaymentDate');
Copyright © 2010 - 2023 Emakin. All rights reserved.