Dynamic Task Assignment
You can assign users, groups, and application roles dynamically in the following ways:
-
By using a task-assignment pattern. This pattern enables you to do the following:
-
Simply enable participants to claim the task manually. This is the default behavior. No task-assignment pattern is applied.
-
If the participant type is either Single or FYI, then apply a task-assignment pattern to select a single assignee of a requested type from all potential assignees in the participant.
For example, suppose that the potential assignees comprise the user
jcooper, the groupLoanAgent, and the application roleDevelopers. Suppose further that the requested type isuser. Applying this task-assignment pattern selects a single user from the userjcooper, and from all members of the groupLoanAgent, and from all users with the application roleDevelopers. -
If the particulates type is Parallel or Serial, then apply a task-assignment pattern to select a single assignee of a requested type from each of the potential assignees in the participant.
For example, suppose that the potential assignees comprise the user
jcooper, the groupLoanAgent, and the application roleDevelopers. Suppose further that the requested type isuser. Applying this task-assignment pattern selects the userjcooper, and one user from the groupLoanAgent, and one user with the application roleDevelopers.
-
-
By using XPath expressions. These expressions enable you to dynamically determine assignment to users not included in the participant type. Here you create a list of potential assignees, one of whom must then claim the task.
For example, you may have a business requirement to create a dynamic list of task approvers specified in a payload variable. The XPath expression can resolve to zero or more XML nodes. Each node value can be either a single user, group, or application role or a delimited string of users, groups, or application roles. The default delimiter for the assignee delimited string is a comma (,).
For example, if the task has a payload message attribute named
powithin which the task approvers are stored, you can use the following XPath expression:/task:task/task:payload/po:purchaseOrder/po:approversids:getManager('jstein', 'jazn.com')This returns the manager of
jstein.ids:getReportees('jstein', 2, 'jazn.com')This returns all reportees of
jsteinup to two levels.ids:getUsersInGroup('LoanAgentGroup', false, 'jazn.com')This returns all direct and indirect users in the group
LoanAgentGroup.
You can use both options simultaneously—for example, you can use an XPath expression to dynamically select a group, and then apply a task-assignment pattern to dynamically select a user from that group.