I'm trying to implement a business process (partially shown in the figure), using JBPM and the Business Central Workspace. The business process is built without errors, but then when I deploy it, the behaviour is not the one expected.
Specfically, the behaviour that I would like to obtain is the following:
- The process starts when a temperature OR co2 message is received (it is not possible to know if the first event received is the temperature or the co2 one).
- When a temperature message is received, TaskTemperature is executed.
- When a co2 message is received, TaskCO2 is executed.
- After that both a temperature AND a co2 messages are received, TaskJoined should be executed.
Instead, running the process in the figure above, the behaviour that I obtain is the following:
- The process starts when a temperature OR co2 message is received (it is not possible to know if the first event received is the temperature or the co2 one).
- When a temperature message is received TaskTemperature is executed.
- When a co2 message is received TaskCO2 is executed.
- The process "stops" in the Gateway and TaskJoined is never executed.
Is there another way to obtain the behaviour that I want?
I know that if I modify the process in this way
the TaskJoined is correctly executed, but, since in my case, there is no a predefined sequence for the two messages, this solution cannot work for me.