Problem Statement :
- Task Assignment to single user of a particular team.
- If required, the task can be assigned to the other user of the team or back to the team from the Process Portal .Basically the end user should be able to reassign the task back.
Expectation : When the task is assigned to single user , in the Owner column of Work Queue (in process portal) – the username should be shown. When reassigned to team , it should be empty and when assigned to the user it should be showing the username.
The task can be assigned to single user/team. If assigned to single user , from process portal the assigned user can reassign back to team or to other members of the team.
Fig.1
Challenges/Blockers :
For assigning the task to single user / team based on the condition we can user the Custom type team assignment, but the challenge here in this type assignment is once the task in the assigned to a single user then it cannot be reassigned back to any other members or back to team. (Fig.2)
Fig. 2
Solution:
The activity will be assigned to the team as shown in Fig.3.
Fig.3
We will design a non-interrupted and non-repeatable Timer event type on that activity which trigger/fire when the token reaches this particular activity. (Fig.4)
Fig.4
Now, in the post assignment of the Timer event we will capture the task id of the particular activity using the system API (tw.system.step.task.id) (Fig.5)
Fig.5
We need to have script attached to the timer , which will check the condition if we need to assign to single user or the whole team.
The script contains these couple of lines code where it will assign the task as per the condition to team/individual.
if(tw.local.assignTask !=null && tw.local.assignTask != undefined && tw.local.assignTask != "")
tw.system.findTaskByID(tw.local.taskId).reassignTo(tw.local.assignTask);



https://community.ibm.com/community/user/automation/viewdocument/single-user-assignment?CommunityKey=810abde6-3916-441b-aac3-b9105bb37e3c&tab=librarydocuments