Hi Everyone,

I have the following doubt on parallel process:

If we want to run parallel processes in separate process and if we do not set terminate property of parallel processes to yes, as shown below

 

then it means ship order human activity will also run simultaneously with order packing? If No, then what is the difference by setting terminate property to yes or no.

Hi Lovish,

Don't you think it should be sequential rather than parallel because if any error occur during the IssueInvoice then how will you control the PackMaterial process?

Regrads,

Manish Jawla

Manish Jawla wrote:

Hi Lovish,

Don't you think it should be sequential rather than parallel because if any error occur during the IssueInvoice then how will you control the PackMaterial process?

Regrads,

Manish Jawla

Hi Manish,

The execution inside the order packing will be parallel. But i think if any problem occurs inside issue invoice then pack material should not be effected because it is independent of issue invoice. We can handle the errors of each parallel process individually. If I am wrong can you please elaborate more on the same.

But my question is, when the order packing process runs, will ship order activity also run? or it wait for the order packing to be completed. Also, is there any impact of setting terminate end property to yes?

Regards,

Lovish


Hi Lovish,

The OrderPacking sub-process needs to finish before the main process can continue to the next activity (ShipOrder). That doesn't change, regardless of using End or Terminate in the sub-process.

The difference between having both flows of the sub-process end with an End (what's on your image) versus one flow ending with End and the other ending with a Terminate has to do with how the sub-process is considered finished:

  • an execution flow of a process can end with an End or a Terminate
  • a process (any process, whether it's called as a sub-process or not) ends when:
    • all the execution flows reach an End
    • at least one of the execution flows reaches a Terminate

This means that if, for instance, the PackMaterial execution flow ended with a Terminate, then as long as that flow had finished execution, the OrderPacking would be finished and ShipOrder could start - regardless of whether IssueInvoice activity had even started executing, or that execution flow reached its End.

Hope this helps!

Jorge Martins wrote:

Hi Lovish,

The OrderPacking sub-process needs to finish before the main process can continue to the next activity (ShipOrder). That doesn't change, regardless of using End or Terminate in the sub-process.

The difference between having both flows of the sub-process end with an End (what's on your image) versus one flow ending with End and the other ending with a Terminate has to do with how the sub-process is considered finished:

  • an execution flow of a process can end with an End or a Terminate
  • a process (any process, whether it's called as a sub-process or not) ends when:
    • all the execution flows reach an End
    • at least one of the execution flows reaches a Terminate

This means that if, for instance, the PackMaterial execution flow ended with a Terminate, then as long as that flow had finished execution, the OrderPacking would be finished and ShipOrder could start - regardless of whether IssueInvoice activity had even started executing, or that execution flow reached its End.

Hope this helps!

Hi Jorge,

So it means,  ship order will run twice one for issue invoice and other for pack material if they finish on different time. If i want all the flows of sub-process should finish and then ship order activity should run, then can it be possible with parallel flows or i have to add wait? or their is something.

Regards,

Lovish

Solution

Lovish,

No. Inside your sub-process, you have two parallel execution flows. Since they both finish with End, only when both reach their End will the sub-process finish.

An execution flow is sequential, so that means that only after the sub-process finishes will the ShipOrder be scheduled to be executed.

In conclusion: ShipOrder will only run once and only after all execution flows defined in OrderPacking have finished.

In addition: using sub-processes is the best-practice for split-and-join parallel execution flows.

Hope this makes it clearer


Solution

Lovish Goyal wrote:

Manish Jawla wrote:

Hi Lovish,

Don't you think it should be sequential rather than parallel because if any error occur during the IssueInvoice then how will you control the PackMaterial process?

Regrads,

Manish Jawla

Hi Manish,

The execution inside the order packing will be parallel. But i think if any problem occurs inside issue invoice then pack material should not be effected because it is independent of issue invoice. We can handle the errors of each parallel process individually. If I am wrong can you please elaborate more on the same.

But my question is, when the order packing process runs, will ship order activity also run? or it wait for the order packing to be completed. Also, is there any impact of setting terminate end property to yes?

Regards,

Lovish


Hi Lovish,

Answer to your first question:

But my question is, when the order packing process runs, will ship order activity also run? or it wait for the order packing to be completed: Process will wait. refer below screenshot.


Second Question:

Also, is there any impact of setting terminate end property to yes? Yes

because if you want to terminate your process either once invoice is done or packaging is done, you set terminate to yes.

You can refer the below example, if you can to continue and do not want to wait until both of them got completed, then you should set terminate to yes.

Jorge,

So i can conclude from above discussion that, if all the parallel process ends with Terminate, then any of the parallel flow finishes then sub process will be completed.

Second is, if all the parallel processes of sub process ends with END, then all the processes needs to be finish, only then sub process will be completed.

Regards,

Lovish

Manish Jawla wrote:

Lovish Goyal wrote:

Manish Jawla wrote:

Hi Lovish,

Don't you think it should be sequential rather than parallel because if any error occur during the IssueInvoice then how will you control the PackMaterial process?

Regrads,

Manish Jawla

Hi Manish,

The execution inside the order packing will be parallel. But i think if any problem occurs inside issue invoice then pack material should not be effected because it is independent of issue invoice. We can handle the errors of each parallel process individually. If I am wrong can you please elaborate more on the same.

But my question is, when the order packing process runs, will ship order activity also run? or it wait for the order packing to be completed. Also, is there any impact of setting terminate end property to yes?

Regards,

Lovish


Hi Lovish,

Answer to your first question:

But my question is, when the order packing process runs, will ship order activity also run? or it wait for the order packing to be completed: Process will wait. refer below screenshot.


Second Question:

Also, is there any impact of setting terminate end property to yes? Yes

because if you want to terminate your process either once invoice is done or packaging is done, you set terminate to yes.

You can refer the below example, if you can to continue and do not want to wait until both of them got completed, then you should set terminate to yes.

Thanks manish and jorge for explaining it in more detail.


Lovish,

Processes are only the main one (that starts with New ORDER) and the one executed as sub-process OrderPacking, the rest are simply (parallel) execution flows.

So i can conclude from above discussion that, if all the parallel process ends with Terminate, then any of the parallel flow finishes then sub process will be completed.

Yes, in this case if any of the execution flows reaches its Terminate then the sub-process will immediately finish.

Second is, if all the parallel processes of sub process ends with END, then all the processes needs to be finish, only then sub process will be completed.

Yes, in this case only when all of the execution flows reach their End will the sub-process finish.

Glad we could help!