Setting up a team retrieval service

If you do not want to assign an activity to a static team, you can define a service that dynamically returns a set of users and managers.

About this task

A team retrieval service can use custom defined input parameters to resolve a set of team members and team managers.

You can define a new team retrieval service either when you define a team, or when you assign an activity to a team.

Procedure

  1. If you are working with a BPD, and want to assign an activity to a dynamically retrieved team, complete the following actions in the Designer view.
    1. Open the diagram of your BPD and select the activity that you want to assign to a team that is defined by a team retrieval service.
    2. Go to the Assignments page in the properties view.
    3. From the Assign To list, select Team.
      Tip: The Assign to Lane option can also be resolved by a team retrieval service if the team that is assigned as the default team for the lane is a dynamically resolved team.
    4. If you want to assign the activity to an existing dynamically defined team, click Select then select the name of the dynamically defined team.
    5. If you want to assign the activity to a new dynamically defined team, click New, provide a team name, then continue at step 3.
  2. If you want to create a team that is dynamically resolved, complete the following actions in the Designer view.
    1. Click the plus sign next to Processes and select Team from the list of components.
    2. In the New Team window, enter a name for the team and click Finish.
    3. IBM® Business Process Manager Designer displays the properties for the team. Supply the requested information.
  3. In the team editor, define a new team retrieval service, by completing the following steps.
    1. Select Specify Team Using Service.
    2. Click New.
    3. Enter a suitable name for the service, for example, Claims Team Retrieval Service.
    4. Select the Variables tab. The mandatory input and output variables are already present and are locked. If the new team retrieval service requires information from the activity, click Add Input to specify more input parameters. In the Details section, specify the name of the variable, its type, and any default value.
      Important: If you want to use this dynamic team as the managers of another team, you can use only additional input parameters that have default values that are defined for them.
    5. Select the Diagram tab and provide the implementation of the service. Based on the input parameters, the service must return a Team object that contains a list of team members. It can also optionally include the name of a team of managers, and optionally the name of the team (this parameter is ignored).
    6. If you want the results of the service to be cached for each combination of input parameter values, select the Overview tab, then in the Service Result Cache section, select Enable caching of service results to display the cache configuration fields. By default caching is disabled.
      • When caching is disabled, the Cache results for section is not displayed.
      • When caching is enabled, the Cache results for section is displayed. By default, when caching is enabled, the results for each combination of input parameter values are kept in the cache for 12 hours. To change the caching period, use the Days, Hours, Minutes, and Seconds fields to select the duration that you want.
        Important: Depending on the size of the results, you might need to tune the size of the service results cache to avoid memory problems. By default, the cache stores up to 4096 results. You can change the size of the cache by setting a different value for <service-result-cache-size> in the 100Custom.xml file, inside the <server merge="mergeChildren"> section.
        Restriction: The service results cache setting only works for top level services. When a service is called by another service, the service results cache setting for the nested service is ignored and the results for the nested service are not cached.
  4. To use an existing team retrieval service, complete the following steps.
    1. Click Select. A selection dialog is displayed that lists all existing services that match the team retrieval service template.
    2. Select the team retrieval service that you want to use.
  5. If the team retrieval service that you selected requires extra parameters, then the Team Retrieval Service Input Mapping section is displayed. For each required parameter, enter the corresponding environment variable name or literal, for example tw.env.businessPriority.

Results

The team's members are determined dynamically by the appropriate team retrieval service. If you defined a new team retrieval service, it is available to select when you assign activities to teams, as described in Assigning activities.