Question
Cognizant
IN
Last activity: 20 Mar 2024 3:05 EDT
How can we configure parallel processing for cascading approval.
I have a requirement to configure cascading approval (Reporting structure) but the approval is following a sequential process,my lead wants that to follow a parallel process like first the case goes for managers approval then it goes to director and after that it goes for VP'S approval but we want that when the case is routed to manager at the same time even director should be able to approve it from his end.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 19 Mar 2024 2:35 EDT
Bits in Glass
IN
@TanyaS58 okay that will work until the hierarchy remains same because you have hardcoded the 3 flows. You need to consider future scope also. If hierarchy differs for different situations and number of approvers change, then you will have to change your design.
If customer says it doesn't change, then it's fine. Best practice is to make it dynamic as it's routed based on level of hierarchy.
Updated: 18 Mar 2024 11:02 EDT
Bits in Glass
IN
@TanyaS58 then in that case you need to use split for each. Reporting structure will work sequentially. You need to populate a pagelist with the persons info(based on reporting structure). Then use that pagelist for split for each. Approval will be assigned all the persons in the reporting structure in parallel. Use ootb operator info dpage to get operator's info, if operator has manager, get his details and append to pagelist if not he is the highest person in structure and you can proceed.
Cognizant
IN
@Anoop Krishna so for approval we need to use split for each shape and there need to configure a pagelist?can you also share the exact ootb data page name as well?
Cognizant
IN
@Anoop Krishna can you please share the exact Logic for appending the pagelist?likehow from this data page are we mapping to the pagelist?
Bits in Glass
IN
@TanyaS58 correct. You can use D_GetOperator dpage.
This will a recursive logic. If you are getting manager using this dpage get the details of the manager and append. So till it's giving manager operator, get manager's info. Once you are not getting, exit data transform.
Cognizant
IN
@Anoop KrishnaActually this is not working I tried to configure a DT before the split for each flow but that data page itself is not getting used up.
Cognizant
IN
@Anoop Krishna because for looping or even using a when condition the data page is giving some error
please find the error screenshot attached
Cognizant
IN
@Anoop Krishna its already defined
thats what i am not understanding why its saying undefined
Cognizant
IN
@Anoop Krishna now will follow the approach that you mentioned ,so will it route to the operators in hierarchy?
Cognizant
IN
@Anoop Krishna My requirement is like for all departments say disputes ,credit card ,Lending etc the case should go for approval by manager,director and VP but this approval flow should be parallel and not sequential.
Please find the pages and classes tab screenshot as well
Cognizant
IN
@Anoop Krishna I am getting this error
- LegacyModelAspectInvokableRuleContainer.invoke-Exception Encountered a :java.lang.NullPointerException
please refer the screenshot and advise the changes that I should do.
Bits in Glass
IN
@TanyaS58 can you run the dpage standalone and check if it's working fine?
Also for dpage, define code-pega-list for dpage. pxResults and for dpage the actual class.
Cognizant
IN
@Anoop Krishna yes I executed the data page earlier itself and its executing fine.And that code pega list i will do hopefully it should work now. .
Cognizant
IN
@Anoop Krishna this approach didnt work as on selecting split for each and giving a flow name the routing option we need was like the case to be routed to all the 3 operators that is manager,director and VP eventhough I configured custom routing still cases are not getting routed to the operators.
Bits in Glass
IN
@TanyaS58 this approach will not work, because you are trying to route an assignment in the case to multiple operators at a time. It will throw error. You need to have parallel sub flows in the case, meaning there will be 3 assignments and those 3 will be routed to manager, director and VP at a time.
Cognizant
IN
@Anoop Krishna yes I replaced split for each with split join and it worked now.
Accepted Solution
Updated: 19 Mar 2024 2:35 EDT
Bits in Glass
IN
@TanyaS58 okay that will work until the hierarchy remains same because you have hardcoded the 3 flows. You need to consider future scope also. If hierarchy differs for different situations and number of approvers change, then you will have to change your design.
If customer says it doesn't change, then it's fine. Best practice is to make it dynamic as it's routed based on level of hierarchy.
Updated: 19 Mar 2024 2:42 EDT
Cognizant
IN
@Anoop Krishna how can we make it dynamic,I mean here we have 3 operators and approval should follow parallel processing ,business logic routing wont work(as if one operator is true then the decision tree will not check for the other 2) and configuring an OOTB activity and calling decision table as a parameter also didn't work for me as we have 3 properties to check that operator should be manager,director and VP and then route it.
Bits in Glass
IN
@TanyaS58 you have create 3 flows for split for join right. You can have 1 flow and use that in split for each.
In a pagelist, populate 3 pages and in each page set .pyUserIdentifier Or any other property to those 3 users.
. Users.pxResults (1). pyUserIdentifier = Director operator
Users.pxResults (2). pyUserIdentifier = VP operator
and so on.
And in the assignment within your flow, provide . PyUserIdentifier.
Updated: 20 Mar 2024 3:05 EDT
Cognizant
IN
@Anoop Krishna yes I was using this approach earlier like setting a pagelist property Approver with a list of approvers using D_GetOperators data page and but the assignments were not getting routed to 3 operators at a time. Like everytime 3 assignments were created and routed to manager only.I was able to see 3 entries in the pagelist and 3 flows but all of them were routed to manager and even if you login from director or Vice president operator still the case was available to managers.
Plz find the screenshot of mapping approvers.