If multiple messages can start a process, then define the relevant receive steps within a fork and set the Start Process indicator for each of the receive steps.
In the following graphic the example has two Start Process receive steps.
Either Message_1 or Message_2 can start the process. The message that is received first starts the process. The process then waits until the second message has been received. The messages are linked by the correlation K_1. Both messages must be received for the fork to finish.
The process can run as follows:
● Message_1 is received first.
Message_1 starts the process and activates K_1. The process waits until Receiver Step_2receives Message_2, which is correlated by K_1. Once Message_2 has been received, the fork is finished and the process continues with the next step after the fork.
● Message_2 is received first.
Message_2 starts the process and activates K_1. The process waits until Receiver Step_1receives Message_1, which is correlated by K_1. Once Message_1 has been received, the fork is finished and the process continues with the next step after the fork.
Correlation: Defining Assignment of Messages to Process Instances