Discussion

10
Replies
11839
Views
Subh_1947 Member since 2011 10 posts
Cognizant
Posted: 4 years ago
Last activity: 3 years 5 months ago
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
Share this page LinkedIn