I have a few Message Intermediate Catch Events that model steps in an automated external process. We just want to record when each event occurs. This works well enough except for when an message for an event is skipped. So imagine:
Expected event sequence Step1 → Step2 → Step3
Actual messages received Step1 → Step3
Externally (consider a manufacturing process) it is impossible to get from Step1 to Step3 without going through Step2. So then if Step3 occurred then Step2 must have occurred. We’d like to be able to compensate for this by sending a message for Step2 when the Step3 message is attempted but fails (no correlation found as Step2 is expected).
Is there a way to model this in BPMN declaratively or do we need to add logic in the external code we have that interacts with the REST API to figure out what to do? None of this is written in Java - we are only interfacing with Camunda through the REST API. We’d also like to stick with Message Intermediate Catch events as these can be competed via a business key instead of our having to do a database query to map our business key to an activity id (uuid) as we do for completing external task activities.