Split Join shape in pega

Parallel processing in Pega

We can allow users to perform multiple tasks independently to complete the work, in pega we can this as parallel processing. In a stage or flow rule, we can add smart shapes to achieve this parallel processing.

Smart shapes in pega

Pega has defined some smart shapes like Split Join, Split-For-Each, and Spin-Off. We have to use these smart shapes in sub-process shape. Each shape can call one or more processes to proceed in parallel.

Split Join shape in pega

split join shape in pega
Use Split Join shape to define two or more sub-processes that can run independently but in parallel and later they can rejoin.

I Will explain with an example: In a Service Request case type when the user submits a request it should be going for the inspection process. We have identified two types of inspections 1. Onsite-inspection and 2. Offsite-inspection, they ALL should be completed before the main case (Service Request) proceeds further. Using Split Join shape to fulfill this requirement with two sub-processes. These two processes are unrelated and can be performed in sub-processes that proceed independently and in parallel. When the sub-processes are complete, the main Service Request application process can continue to the Review stage where the management team will review the inspection report.

adding split join in case type

How to configure Split Join shape

From the Diagram tab of flow rule - Advanced Shapes, we can choose Split Join shape.
adding split join shape in flow rule

Configure split join properties by adding sub-processes and join types.
configure subprocess in split join

split join shape properties

Join type: 
All -     Waits for all sub-processes to complete and return.
Any -   Waits for anyone sub-process to complete and return. If one sub-process completes the process and returns, remaining sub-processes (if any) will stop processing as the main process resumes its action.
Some - Waits for a when condition to return a true value, or a specific number of flows to return a status value that you provide.
join some in split join shape

Let's create a Service Request case and advance the case till it creates two sub-sorceresses, one is for the Onsite-inspection process (routed to On-Site Inspector) and the second one is for the Offsite-inspection process (routed to Off-site inspector). We have selected Join type as ALL, so the main process (Service Request) will wait for both Onsite Inspection and Offsite-inspection sub-processes completes. Once sub-processes completes and returns, the Service Request process resumes and cases will be moved to the Review stage for "Schedule Repair" action.
split join case creation

Once you click on the submit system creates two sub-processes.

sub processes in split join shape

On the Action tab of the Service Request case, we can see two sub-processes Onsite-inspection and Offsite-inspection and there is no flow action related to Service Request. Once we complete both the sub-processes we can see "Schedule Repair" flow action for the main process, which means the main flow resumes.
main flow resumes

Finally, we can use a split join shape if we have two or more unrelated processes that need to be executed during the main flow.

Related topics in parallel processing:



1 comment:

  1. nice explanation this article is very use full for me

    ReplyDelete