Parallel processing is not as advertised
In order to achieve parallel processing we have implemented couple of approaches.
1. Configured three different flows and all of them are 'Start upon stage entry'.
2. In another flow we created spinoff flow inside the main flow so they execute in parallel.
In both the above approaches we have seen that Pega doesn't do parallel processing but rather does sequential. This was verified by capturing the start and end times configured in different flows. In 1 above first it executes flow1, then flow2 and flow3 and in 2 above it enters main flow, then goes in spin off and finishes it and then comes out and finishes main flow.
We are on v8.6.2.
Can some one please explain why this is not working as expected.
@ShakesLets look at the scenarios one by one :
Scenario 1 : This is always sequential, as the stages themselves are sequentially called. I am not aware of any documentation which calls this method of invoking flows as "parallel" in any sense.
Scenario 2 : A spin off flow provides something called a "business parallelism", and not parallel code execution, as you might be expecting. Read this for more details : https://collaborate.pega.com/discussion/spin-flow-really-parallel-process-pega-says
The only way to achieve true parallelism in PEGA is to use Data pages using the method Load-Data Page in pega , and then using a Pool ID to distribute the work into child threads for each page. A Connect-Wait method can then be used to reconcile all the child thread code into the execution context. This page has more details : https://onestoppega.com/data-modeling/data-page-asynchronous-execution/
If your flow can be asynchronously , then having a background agent like Job scheduler can also do the trick. I have heard that Data Flows can also achieve true parallelism, but I am yet to encounter a use case where this has worked.