Process and sub process synchronization

Hello,
I have made a test “Process 1” and “Process 2”. “Process 2” is called from “Process 1” as call activity. There are 2 scenarios:

  1. Token is in “Process 1”/ACTION 1. I receive the closing message and go to “End process”
  2. Tokens are in “Process 1”/Call process 2 and “Process 2/Timer”. I receive closing message and have to close “Process 2” and then “Process 1”
    What could be the best approach to solve this problem in BPMN?

example_process.bpmn (20.5 KB)

Hi @Peteris_Zabinaks,

if it’s important that the Process 2 is completed before Process 1 then you should not wait for the message when the call activity is active. You can use boundary events or sub-processes to limit the scope. For example:

https://cawemo.com/shares/0c78213a-46b2-486f-9f34-ef32bda4479c

Does this help you?

Best regards,
Philipp

Hello,
Thank you for answering.

For now I have an idea to use throwing message from " Process 1" if there are active subprocess " Process 2" for business key. And then wait for confirmation message after needed actions executed in " Process 2" .
example_process_v2.bpmn (25.7 KB)

Peteris