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 group LoanAgent, and the application role Developers. Suppose further that the requested type is user. Applying this task-assignment pattern selects a single user from the user jcooper, and from all members of the group LoanAgent, and from all users with the application role Developers.

    • 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 group LoanAgent, and the application role Developers. Suppose further that the requested type is user. Applying this task-assignment pattern selects the user jcooper, and one user from the group LoanAgent, and one user with the application role Developers.

  • 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 po within which the task approvers are stored, you can use the following XPath expression:

    /task:task/task:payload/po:purchaseOrder/po:approvers

    ids:getManager('jstein', 'jazn.com')

    This returns the manager of jstein.

    ids:getReportees('jstein', 2, 'jazn.com')

    This returns all reportees of jstein up 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.