Hi,
If a user is part of 2 groups: Assistant and Manager.
Same user who submitted a task as an Assistant shouldn't be able to access next task in the flow as Manager.
Is there a way not to show/disable the accept and reassign buttons when the same user tries to claim the task?
Or can we show an error message when trying to accept?
Any help/ideas are appreciated.
Thanks,Keerthi
Discussion posts and replies are publicly visible
It can be done ,Can we know where you got stuck and the current design you have ?? In general we save Details related Assistant task. We use these details to validate against loggedinuser on manager task . If the current logged in user and the person who did the Assistant task are same .We will restrict him on opening/Completing manager task .
Thanks Venkat, you are right about the requirement.
I don't have any design yet. Is there any OOTB options to conditionally restrict while accepting/opening task and show error message?
You can easily use the OOTB assignment feature to do so. Just exclude the person completing the first task from assignment of the next one.
Depends on how you designing your process model , I mean these tasks going to be in Same Process model?? If Yes, remove chaining and exclude the person who did the task before in the assignment tab .If it's Database centric you can follow the steps i mentioned above .
2nd Task should go to Manager group, if I exclude the person(previous task performer) from Manager group, does that only impact that specific instance?
keerthik0010 said:if I exclude the person(previous task performer) from Manager group, does that only impact that specific instance?
Yes, Save the tp!owner of Assistant task in process variable and exclude him in Manager task
This should work fine if you can remove the user who has completed the 1st task (Save the tp!owner in a process variable from the 1st UIT output) from the list of users in the assignment of the task followed by the first one. below is a code you can reuse for that purpose.
a!localVariables( local!groupMembers: a!groupMembers(group: cons!YOUR_GROUP_CONSTANT).data, remove( local!groupMembers, wherecontains( tostring(pv!ownerOne), touniformstring(local!groupMembers) ) ) )
This is a good example for using the set function difference().
difference( touser(a!groupMembers(<YOUR_GROUP>).data), <USER_SUBMITTED_THE_FIRST_TASK> )