I have a simple process that works with client’s data. Let’s say I am on step “Validate Client Info” and my business key of the process is “key1”. Then new message arrives and I correlate this message with the same business key “key1”. It might be a mistake of another system or whatever.
What will happen to my business process? Will message correlation fail or Camunda just continues from “Validate Client Info”? And what are possible solutions if that is the problem?
How exactly would you expect this to happen?
This is a rare case and might even never happen, but because I work in a bank, I have to deal with this case. The actual bpmn schema is much more complicated, so I just simplified it for visibility
It’s very hard to answer without more details of the implementation.
If a system tries to send a message with incorrect coloration details it will fail to send and the process is unaffected.
Alright, let me describe with more details.
- Client Process starts by BusinessKey = “BK1”
- Finishes “Send Client Info”
- Receives “Wait Client Info Response” message, gets “BusinessKey” = “BK1” from parsed message and correlates message with process by “BK1”
- Currently is executing “Validate Client Info”
In parallel, another message arrives to “Wait Client Info Response” with the same “BusinessKey” = “BK1”. Now I correlate this message with process by “BK1”
My process is on “Validate Client Info” and message tries to correlate on step “Wait Client Info Response”. My logic of correlation is just parse message and correlate message.
Do I need to check somehow before correlation, that such process already exists before starting it? I use Spring and have Camunda’s RuntimeService injected
On one message will ever trigger the event - if 2 messages matching the same criteria are sent at the same time - one will succeed and the other will fail.