Assigning teams to user tasks

For activities that are implemented as user tasks, you can designate the users who receive the runtime task by using the Assignments page in the properties for the user task.

Procedure

  1. Open a process and go to the Definition page.
  2. Click a user task in the process to display its properties.
  3. Go to the Assignments page in the properties view.
  4. From the Assign To list, choose one of the following options:
    Table 1. Assignment Options
    Option Description
    Lane Assigns the runtime task to the team associated to the swimlane in which the selected user task is located (the default selection). If you select this option, you can use a team filter service to dynamically eliminate users from being assigned to the user task.
    Team Assigns the runtime task to a team. If you select this option, you can either specify a static team or use a team retrieval service to dynamically select a suitable set of users. In addition, you can use a team filtering service to remove unsuitable users from the team.
    Process starter Assigns the runtime task to the user who started the process. Tasks that are assigned using this option will not appear in the Team Performance dashboard.
    Custom Assigns the runtime task according to the JavaScript expression that you provide in the corresponding field. To select a variable for your expression, click the variable selection icon next to the field. The JavaScript expression can produce the following supported expression formats:
    • USER:user_name;TEAM:team_name
    • USER:user_name;ROLE:group_name
    • ROLE:group_name
    • USER:user_name
    • TEAM:team_name

    In the above list, user_name is the name of a user (such as author) and group_name is the name of a security group (such as tw_authors), and team_name is the name of a team.

    When USER and either TEAM or ROLE are specified in the expression, the task will be assigned to the specified user and either the team or role. There is no membership validation check for whether the specified user is member of the team or role. The order of USER, TEAM and ROLE in the expression is not significant.

    Note: Complex JavaScript expressions can be typed in or pasted into the Expression field and can be customized as required. More valid expressions can be chained together to produce a complex JavaScript expression, for example tw.local.isWeekendCrew?"ROLE:WeekendManagers":"ROLE:Managers".
    Important: To show up in the Teams dashboard, tasks must be assigned to a Team or a team Lane.
  5. Optional: From the Experts Team list, select the team that you want to associate with the selected activity.
  6. If you selected Assign To Team you must assign a team.
    1. To define a new team, click New, provide a name, and complete the team properties.
      For more information about the team properties, see Creating a team.
    2. If you want to select an existing team, click Select, then choose a team from the list.
    3. If you want to specify a fixed team name or a team that is not defined yet, enter the name as a literal value, for example, damageAssessors.
    4. If you want the team to be selected by the value of a local or environment variable, specify the name of the variable, for example, tw.local.dynamicTeamName.
  7. Optional: If you selected Assign To Team or Assign To Lane the Team Filter Service section is displayed.
    If you want to use a team filter service to eliminate certain users before the user distribution is applied, complete the following steps.
    1. To assign a Team Filter Service, either click Select to select an existing team filter service or click New to define a new one.
    2. If the team filter service that you selected or defined requires parameters from the application, a Team Filter Service Input Mapping section is displayed.
      For each required service variable, enter the corresponding process variable name, for example tw.local.estimatedClaimAmount or tw.system.user.id.
  8. From the User Distribution list, choose one of the following options:
    Table 2. User Distribution
    Option Description
    None Runtime tasks are assigned to all potential users (the default setting).

    This option always applies to assignment options that result in a single user for the runtime task assignment, for example, when a list of users contains only one user.

    Last User Applies only to Lane and Team assignment options.
    Assigns the runtime task to a user who completed an earlier task.
    • If the assignment option is set to Lane, the task is assigned to the last user associated with the activity that was most recently completed in the same lane.
    • If the assignment option is set to Team, the task is assigned to the user who completed the last task that was assigned to the same team.

    In both cases, the task is assigned only to an established last user, if the user is a member of the group associated with the task. An established last user is determined by using the policy valid for the Lane or Team assignment option, respectively. If the user is not a member of the group associated with the task, then the task is assigned to the task group.

    Do not select the Last User option for the first activity in a lane unless the activity is a service in a top-level process and a Start Event is in the lane. If the Assign To is Lane and the user is a member of the lanes team, the runtime task is routed to the user who started the process.

    Load Balance From the potential users who can receive the runtime task, the task is assigned to the users who have the fewest number of open tasks, regardless of presence.
    Round Robin From the potential users who can receive the runtime task, the task is assigned to users in a round-robin fashion. For example, if the users in the Call Center team must receive the runtime task, each task (created by each process instance) is assigned in a series to one user in the team after another.

    By default, the created tasks are assigned in a round-robin fashion only if they are created a few seconds apart and are not created in parallel. However, if tasks are created in parallel, some of them might sometimes be assigned to the same user.

    Note: Sorting by task ID does not necessarily reflect the order of the user assignment. Consider the following example:

    Due to parallel processing of the process engine (BPD), several tasks are created with the same time stamp. Let us call the created tasks task1, task2, task3, and task4 with task IDs T1, T2, T3, and T4 respectively and users U1, U2, U3, and U4. During round-robin processing, tasks are assigned to users as task1-U1, task2-U2, task3-U3, task4-U1.

    However, due to serialization limitations, the task IDs might not be assigned in the same order as the created tasks. Instead, they can be assigned as task1-T1, task2-T3, task3-T4, task4-T2. Now, because the creation date and time is the same for all tasks, when you sort the data by task ID, the sorted order is T1(task1)-U1, T2(task4)-U4, T3(task2)-U2, T4(task3)-U3.