Posted: 8 Oct 2016 2:44 EDT Last activity: 25 Oct 2016 2:29 EDT
Routing in Approval Shape, how can I fix the routing to a same party in the case
A user submits a case for approval and his supervisor who is the reporting manager. The Single Approval step has an option to select the reporting manager, and therefore it is correctly routed to the (OperatorID.pyReportTo) of the user.
The Reporting Manager of the submitting user can sometimes route the case for consultation to another stage to another user who has different Reporting Manager. When the another user sends the case back to the stage of reporting manager, the case does not go to the original reporting manager but it goes to teh reporting manager of the the second user!
Would you please provide the resolution how to ensure the reporting manager of the 1st user always gets the case rather than the reporting manager of the second user?
Pega brings the concept of Workgroup - group of people doing a specific business work. So in your case - the reporting manager should ideally be the same for both users. Assuming the consultation was sent over to a user of different Workgroup - I would recommend using workbaskets as 'individual routing' logics may not hold extensible. Say you have two levels of operators - consultants & managers for teams A and B.Consultant A creates and case goes to Manager WB for team A. Manager A will send a case to team B consultant workbasket. Any consultant can pick up the case and work on it(instead of routing it to specific person who might not be available!). The operatorId of the ManagerA can be saved on a property to route the case back to him(as he is now the case owner) from team B submission. A flag can help you differentiate you such cases from daily cases created by team B which will follow normal 'Reporting Manager WB' routing. This will hold good for even future requirements where the number of user or teams(say team C,D,Eetc) grow in the org.
Thank you for your detailed guidance, is really helpful. My case is that a bit different in a sense that there will be a different supervisor (reporting manager) for each user. This scenario is easily handled by configuring the supervisor in report to field in operator's profile. Therefore, I configured route to 'Reporting Manager' while entering the approval stage. But when manager sends to another team's workbasket, it changes the stage to an alternate stage. when other team responds, the the stage changes back to the approval stage. The approval stage already has the route to reporting manager and taking the undesired reporting manager of another team member.
I stored the original reporting manager's id in a property, and wanted use a flag, but the rules that have route to reporting manager was not obvious to me where i think i could use the flag. any further details please?
There are many OOTB routing activities that can be used. Not sure about your exact business requirement but for this specific case you can use 'To WorkList'(it takes operator id as parameter) and specify the prop name storing the reporting manager id as parameter. You may need to differentiate these assignments from you normal user-supervisor-flowend scenarios. One can also write custom routing activities in pega. Will be worth looking at if you wish to understand possible OOTB pega routing.