Parallel processing in Pega applications
You can configure a stage to run multiple processes in parallel. This configuration allows users to perform tasks independently to complete the work in a stage. For example, in the recruitment stage, you can include a process for interviewing a candidate. In the same stage, you can include a process for verifying a candidate's job history. Both processes can be started and completed independently. When the interview and job verification are completed, the case moves to the next stage.
For more complex parallel processing requirements, Pega provides the Split Join shape, the Split For Each shape, and the spinoff option in the Subprocess shape.
The process to which you add the shape is called the main process. The shapes call one or more subprocesses that proceed in parallel.
Note: Review the locking strategy and consider switching to the multiple user locking strategy. If concurrent access occurs, a user might need to refresh the assignment if another user makes changes at the same time. Learn more about case locking later in the mission.
You use the Split Join shape to call multiple independent processes that operate in parallel and, later, rejoin. For example, a mortgage application process may require that a user validates the home buyer's credit history. At the same time, another user must perform a title search. Both of these processes are unrelated and can be performed in subprocesses that proceed independently and in parallel. When the subprocesses are complete, the main mortgage application process can continue. This is similar to a parallel process in the case life cycle; when all the processes in a stage are completed, the case enters the next stage or is resolved.
However, the Split Join shape gives you the flexibility to use join conditions that determine when the primary process can continue. The join condition may iterate over a when condition or a count to determine when to resume the flow. For instance, a Split Join may include three separate approval subprocesses. You can specify that only two of the three approvals must be completed before resuming the main flow.
Split For Each
A Split For Each shape allows you to run one subprocess multiple times by iterating through a set of records stored in a page list or page group. When the items on the list have been processed, the main flow continues. For example, you can use a Split For Each to iterate over a list of vendors and send a quote request from each vendor on the list. Like the Split Join, you can use a join condition to control when the primary process resumes. If you use an iterate join condition, you can start flows for elements of the Page Group or Page List property one by one, and configure testing conditions to determine whether to continue.
The spinoff option in the Subprocess shape allows you to run the subprocess in parallel with the main flow. The main process does not wait for the subprocess to complete before proceeding. The subprocess does not rejoin the main process. For example, if the inventory is low on a product when a customer places an order, you spin off a subprocess to reorder from the supplier. The main process is unaffected by the subprocess and continues. The spinoff option is an advanced feature in the Subprocess shape and is accessed in the flow diagram.
Check your knowledge with the following interactions.