Spin Off 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.

Spin-Off in pega

The spinoff is not a shape, it is an option in the sub-process shape. Which allows running the sub-process independent and in parallel to the main process. The main flow will not wait for the sub-process and no join options available for SpinOff processes.
spin off

How to configure Spin-Off option in a subprocess

spinoff option in pega

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. Used Split Join shape to fulfill this requirement with two sub-processes. When all 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. In the Review stage, the Inspection report will be reviewed and approved by various Reviewers. To fulfill this requirement we are using Split For Each shape and providing Reviewer details in a PageList. Pega will use this PageList and iterate the process. Once the review is completed the technical team will repair the issue. In the Resolution, stage initiating "Generate Documents" sub-process as an independent parallel process. Service Request case will proceed further and resolve without waiting for the SpinOff process (Generate Documents).
spinoff in case type


let's create a case and see the process.
spinfoff case creation
tracer
spinoff process
review repair
The main flow for Service Request continues without waiting for the spinOff sub-flow (GenerateDocs).
If you want to invoke an independent flow in parallel with the main flow and without stopping the main process we can go for the spin-off option in the sub-process.

Related topics in parallel processing:



Comparing the three parallel options

Split-JoinSplit-For-EachSpin-Off
StartsTwo or more different flowsOne flow, once for each item in a page list or groupOne flow, running on its own
Main flow waits?Yes, until the join condition is met (Any or All)Yes, with Any, All or IterateNo. It carries on immediately
Join optionsYesYesNone
Typical useTwo teams approve at the same timeEvery reviewer or work party must respondSend a notification or log an audit task without holding the case

When to choose Spin-Off

  • The extra work does not affect the main flow's next step.
  • You do not need to know when, or whether, it finished before the case moves on.
  • Examples: an email reminder, a compliance record, a request to archive documents.

A worked example

In a bank's Loan case, when the application is approved, the main flow moves straight to Fulfilment. At the same moment a Spin-Off starts a subprocess that sends the customer a welcome pack and creates a marketing follow-up task. If the welcome pack fails, the loan is not held up, and the error is dealt with by whoever owns that subprocess.

Cautions

  • Because nothing waits for a Spin-Off, do not use it for work the case depends on. Use Split-Join instead.
  • Give spun-off work a clear owner and a service level, or it can be forgotten.
  • A parent case that resolves before its spun-off work finishes needs a rule for what happens to the child work.

Related: Split-Join, Split-For-Each and Spin-Off and the Case Management label.

7 comments: