Hi Jens,
your comment is very interesting and I hope you're right but see below the retrieval script, the internal group is returned as member.
I'm in a lab environment, I cannot now debug the team operations. I will ask for logs.
For a human task a new team id is produced when the internal group is modified or when team refresh occurs.
-----------------------------------------
var roleName = "customRole_" + tw.local.businessRoleId;
var roleDisplayName = roleName;
var roleDescription = "Internal BPM group that represents EDS manager role " + tw.local.businessRoleId;;
var internalCaseGroup = tw.system.org.findRoleByName(roleName);
if (internalCaseGroup == null ) {
log.info("Custom TRS create internal BPM group " + roleName + "for team " + tw.local.name);
internalCaseGroup = tw.system.org.createRole(roleName , roleDisplayName , roleDescription , false);
if (internalCaseGroup == null) {
internalCaseGroup = tw.system.org.findRoleByName(roleName);
}
}
tw.local.team = new tw.object.Team();
tw.local.team.members = new tw.object.listOf.String();
tw.local.team.members[0] = internalCaseGroup.name;
tw.local.team.managerTeam = tw.local.name + " Managers";
------------------------------------------------------
Thanks for help.
------------------------------
Yannick Martin
------------------------------
Original Message:
Sent: Mon May 30, 2022 01:31 AM
From: Jens Engelke
Subject: Team retrieval service after task assignment
Hi Yannick,
I think what you describe should work if your Team Retrieval Service returns the group as a team member.
Your behavior sounds as if the service returns the list of group members as team members. Consequently, the task is assigned to these users, not to the group.
------------------------------
Jens Engelke
Original Message:
Sent: Fri May 27, 2022 03:26 AM
From: Yannick Martin
Subject: Team retrieval service after task assignment
Hi,
I've tested the team build as follow :
"Team1" is a team retrieval service, this service use or create an internal group "customRole1". This internal group contains 2 users "test1" and "test2".
If I start a new process with one task assigned to team "Team1", thru REST API I see an task with potential owners "test1" and "test2".
Now I add the user "test3" to the internal group (thru process admin console) .
The user "test3" don't appear as potential user in the task instance.
And in the Process Portal Work list the task also don't appear for the user "test3".
If I start a the process with one task assigned to team "Team1", I see the user "test3" in potential user list.
In the REST API "getUserTasks", I see that there's a "potential owners" section with an new id (p.e. 2075.2081 instead of 2075.2080 for the previous assigned task) and the model.id is the same.
If a new member joins the team, all tasks assigned to the team before the new member arrival will not be visible to him ?
Is there a option to refresh the team that will affect all tasks ?
Thanks for help
------------------------------
Yannick Martin
Original Message:
Sent: Mon May 16, 2022 05:26 AM
From: Yannick Martin
Subject: Team retrieval service after task assignment
Hi,
I'm responding to myself.
My mistake was that, the direct team membership don't updates the tasks potential users, this is what I've tested.
I have to create an internal role added as member on team to achieve the actual dynamic team membership on tasks.
Best regards
------------------------------
Yannick Martin
Original Message:
Sent: Fri May 13, 2022 11:25 AM
From: Yannick Martin
Subject: Team retrieval service after task assignment
Hi Don,
I expect that the ready task list reflect the team membership when I retrieve user tasks thri REST API but it isn't the case.
First I had to read the sentence saying that the UCA scheduled service (to refresh the team) cannot be scheduled on development environment.
It has to be started manually.
My team refresh service is :
var team = tw.system.org.findTeamByName("Team1");
if (team != null) {
team.refresh();
}
team = tw.system.org.findTeamByName("Team2");
if (team != null) {
team.refresh();
}
But the task list keeps to be the same. In REST API the list of potentiel owners is always the same and the workdashboard for one user which is in and out the team membership doesn't change.
What am I doing wrong ?
Thank for help
------------------------------
Yannick Martin
Original Message:
Sent: Fri May 06, 2022 11:54 AM
From: Don Williams
Subject: Team retrieval service after task assignment
If possible, you might consider assigning the tasks to an internal group/role (those configured under User Management -> Group Management in the ProcessAdmin console) as changes in the role membership would be reflected immediately. This may require the creation of many roles depending on your use case, but using a convention for the role names such as (ProcessApp)_(BusinessIdentifier)_(RoleName) has been an effective pattern for many projects I've worked on over the years. For example:
- ABCPROC_USA_Requestor
- ABCPROC_FRA_Requestor
- ABCPROC_GER_Requestor
- ABCPROC_USA_Approver
- ABCPROC_FRA_Approver
- ABCPROC_GER_Approver
If the number of roles required is simply too many to manage - i.e. more than 50, for example - then using a Team Retrieval Service or Team Filter Service to dynamically build your team is probably your best bet. In this case, you could implement a scheduled UCA which executes a service on an interval of your choosing that runs code similar to the following:
var teams = tw.system.org.getAllTeams();for(var i=0; i<teams.length; i++) { teams[i].refresh();}
You could also add an IF statement in the loop to ensure only certain teams are refreshed, if desired.
------------------------------
Don Williams
Original Message:
Sent: Thu May 05, 2022 10:49 AM
From: Yannick Martin
Subject: Team retrieval service after task assignment
Hi,
we use team retrieval service.
After the tasks assignment (and before claiming the tasks), if the team retrieval service produce a different member list, the tasks don't seem to refresh the potential task owner list. Is it possible to refresh the team for ready tasks ? We tried to use an scheduled UCA to automatically refresh the dynamic teams (see document Teams_im_BPM_8.5_part3.pdf)
Note : we use the "user-tasks" REST API to check the team details on ready tasks.
Thanks for help
------------------------------
Yannick Martin
------------------------------