Discussion

10
Replies
12165
Views
Subhenjit Maitra (Subh_1947)
Cognizant
Senior Pega Consultant
Cognizant
GB
Subh_1947 Member since 2011 10 posts
Cognizant
Posted: November 20, 2015
Last activity: May 5, 2017
Posted: 20 Nov 2015 11:57 EST
Last activity: 5 May 2017 18:51 EDT
Closed

Same case vs Sub case parallelism

Suppose there is a scenario that a user fills in a form and then submits it for it to be approved by say 3 reviewers who has a view of what has been filled in and approve/reject the case independently and based on the approval/rejection status ,the case will follow a specific path down the line.

From a PEGA best practice point of view , what approach should be taken to implement such a scenario?

I could think of doing it in two ways but from a Best practice perspective, I am not sure which one is the better option or if there is another efficient way of doing it.

a)Use split-for each to spin off three assignments on the pyWorkParty property defined for the reviewers and set the pyApproval property depending on whether the reviewer has approved or rejected the form.Once the main flow is resumed, check the pyApproval property on the pyWorkParty based on pxPartyRole=Reviewer and route the main case accordingly.The issue with this approach is that no two reviewers can work on the case at the same time.

b)Spin off sub cases which will route to the reviewers and override DetermineLockString to take care of the locking contention issue. But how do we propagate the result of the reviewer to the main case as approval/rejection isn't an aggregate property.Hence we would need to create two properties approval count and rejection count and propagate them upstream depending upon the reviewers' decision.Also does it warrant creating a sub case which will only take care of an approval process?

Pega Academy
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.