Roles¶
Roles define task responsibilities. Each role has the following configurable properties:
Name: The internal identifier for the role.
Caption: The user-visible name for the role. Supports localization.
Assignment Logic¶
Role assignment uses one of two methods: Decision Table or Expression.
Decision Table¶
A decision table defines assignment rules based on form data without requiring code. Rules are defined in the input section, and corresponding assignees are selected in the output section.
For details, see Decision Table.
Expression (Role Script)¶
A JavaScript script determines the assigned user(s).
Info
Role scripts must return at least one identity. An empty result or failure to return any identity will cause an error.
Advancing to Next Task¶
Selecting an action in role script by setting $WorkItem.SelectedAction
advances the process to the next task without assigning the task to a user.
Example Role Scripts¶
While a wizard simplifies common role definitions, the following examples demonstrate custom role scripts:
Assigning to a Specific Identity:
Replace 'd3b1fe89-6873-4438-8762-164ed73a9054'
with the actual identity ID.
1 |
|
Assigning Based on Data Model Field:
Assuming an "Employee" field exists in the data model populated by a user form:
1 |
|
Assigning to Multiple Users:
Using a JavaScript array:
1 |
|
Alternatively, using semicolons:
1 |
|
Assigning to a Manager:
This script assigns the role to the manager of the user who completed the previous task:
1 |
|
Advance to Next Task
Automatically advance to the next task if approval is not required.
1 2 3 |
|