0 votes
7.3k views
in Interview Questions by

2 Answers

+2 votes
by
edited by anonymous
 
Best answer

From IBM BPM v8.5, the Assignment options which were there before such as "Last User in the lane", "Routing Policy",  "List Of Users" and "Custom" were deprecated an can no longer be used for the Task Assignments.

The Earlier Concept of Participant Groups has been replaced with Teams, a Team can have static members or static LDAP groups, also it can be linked to a "Team Retrieval Service" which can in any way (most commonly used DB lookup) retrieve a group of users and create a team with the members added to it. The result of this lookup can be cached as is the case with any other service.

​In Task Assignments you can assign a Team defined by the above process directly and the task will get assigned to the resulting team from the invocation of the "Team Retrieval Service". Additionally on top of that it is sometimes required to create a dynamic filtered team based on certain inputs e.g. You want to exclude certain people from the team or include only some people and exclude all others in this case "Team Filter Services" come handy, Team filter service takes a team and optional inputs and based on the incoming team and input parameters does some  filteration of users and returns the filtered team back to the Task Assignment call.

There is a common problem/bug with this approach, the filtered team is a temporary team which gets assigned when the task is created, if you add some new members to the Team, the team gets updated with the new members because it is dynamically tied to the Team Retrieval, but the filtered teams are temporary teams and do not get updated when new users are added to the team.

we have solved this issue by creating a small dashboard which does a search for the desired tasks, retrieves the filter inputs and then reruns the team retrieval and filter service using jsapi and assigns the team to the task with jsapi commands.

by (100 points)
Can you please share this approach screenshots or code for reference & help to implement the same. Need your earliest response. Thank you.
by (21.6k points)
This is pseudo code and directions rather than actual working code

Search for all tasks you are interested in using TWSearch and get business data containing the input to the tasks team filter service

You can execute the Team Retrieval Service to get the base team to filter or get it directly from Business Data if available. (Approach will be same as below to call the Team Filter Service using Execute Service by name)

create a map of the inputValues to the team filter service

var tw.local.inputValues= new tw.object.Map();

map.put("input1", tw.local.input1); // This is the team filter custom input be sure to change the name to actual name

map.put("originalTeam", tw.local.OriginalTeam);

var resultsMap = tw.system.executeServiceByName("Your Team Filter Service Name Here", tw.local.inputValues);

if(resultsMap){

    tw.local.newTeam = resultsMap.get("filteredTeam");

}

tw.system.findTaskByID("1234").reassignTo(tw.local.newTeam);
0 votes
by (16.3k points)
by (100 points)
edited by
How to use the Input field of Retrieval Service? I am a begginer.. I mean where to use with what service..how to provide input to the locked input field ...from where?

Related questions

0 votes
2 answers 5.0k views
0 votes
1 answer 2.8k views
0 votes
1 answer 841 views
0 votes
0 answers 427 views
0 votes
0 answers 401 views
0 votes
0 answers 699 views
+1 vote
2 answers 5.2k views
0 votes
1 answer 3.4k views
+1 vote
2 answers 5.0k views
0 votes
0 answers 335 views

635 questions

495 answers

98 comments

3.0k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...