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
- 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.
- 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.
- Go to the Assignments page in
the properties view.
- 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.
- If you want to assign the activity to an existing dynamically
defined team, click Select then select the
name of the dynamically defined team.
- If you want to assign the activity to a new dynamically
defined team, click New, provide a team name,
then continue at step 3.
- If you want to create a team that is dynamically resolved,
complete the following actions in the Designer view.
- Click the plus sign next to Processes and select Team from the list of components.
- In the New Team window, enter
a name for the team and click Finish.
- IBM® Business Process Manager Designer displays the properties for the team. Supply the requested
information.
- In the team editor, define a new team retrieval service,
by completing the following steps.
- Select Specify Team Using Service.
- Click New.
- Enter a suitable name for the service, for example, Claims Team Retrieval Service.
- 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.
- 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).
- 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.
- To use an existing team retrieval service, complete the
following steps.
- Click Select. A selection dialog
is displayed that lists all existing services that match the team
retrieval service template.
- Select the team retrieval service that you want to use.
- 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.