Set Task Priority Based on the Parent Workflow Item Priority
You might need to set the task priority based on the parent item priority. Use the following identifiers in your expressions as task priorities:
Value | ID |
---|---|
Low priority | cmw.taskPriority.low |
Medium priority | cmw.taskPriority.medium |
High priority | cmw.taskPriority.high |
Workflow items don't have a default system field for priority. Create a new field of the List of Values type intended for setting the priority of an item. For example, create the «Request Priority» (ID: Request_Priority) field and drag it to the form of a workflow item. Populate the list with the following values:
Value | ID (created automatically) |
---|---|
Low | Request_Priority.values.Low |
Medium | Request_Priority.values.Medium |
High | Request_Priority.values.High |
Perform the following steps to set the child task’s priority based on the parent item’s priority:
1. Open a workspace, open a necessary application inside a workspace.
2. Click «Workflow Scheme» and double click a required step.
3. In the window that appears, in the «Actions» group click «Task Assignment».
4. Select the «Assign tasks and pre-populate task fields» check box and expand «Task Settings».
5. Set the following rule for priority:
IF($parent->Request_Priority == ID("Request_Priority.values.Low"),
ID("cmw.taskPriority.low"), IF($parent->Request_Priority == ID("Request_Priority.values.Medium"), ID("cmw.taskPriority.medium"), ID("cmw.taskPriority.high") )) |
To check how it works, create a new workflow item and move it through workflow. On the required step the child task will be created with the priority set according to the predefined rule.