Bug on compensation mechanism with multi instances

Hi,

According to the Object Management Group, the BPMN norm on chaper 10-06-02, specify:

Multiple instances typically exist for Loop or Multi-Instance Sub-Processes. Each of these has its own instance of its Compensation Event Sub-Process, which has access to the specific snapshot data that was current at the time of completion of that particular instance. Triggering compensation for the Multi-Instance Sub-Process individually triggers compensation for all instances within the current scope. If compensation is specified via a boundary compensation handler, this boundary compensation handler also is invoked once for each instance of the Multi-Instance Sub-Process in the current scope.

Current implementation of camunda lack of triggering compensation for the others instances. Only the instance throwing the error / compensation is compensate. Others completed instances remain unchange and the others one in progress are stop without compensation.

Can you confirm it’s a bug / missing feature? @BerndRuecker @Niall

Please take a look to my another post for details → https://forum.camunda.io/t/monolith-process-to-micro-service-help/4942/17

I’ve open an issue on your tracker -> https://app.camunda.com/jira/browse/CAM-8409

Hi Jerome.

Thanks for looking up the respective part of the specification. I brought the discussion about MI compensation up internally and we decided to investigate a bit further within the next release (7.9). I definitely agree that it is a big bummer that you cannot easily achieve the desired behavior. I haven’t yet dived into all necessary detail to decide for the best direction. But I hope we will come back to it soon. Sorry that this take a while - at the moment we are really busy with getting 7.8 out of the door and have to prioritize issues from our enterprise customers. But it will not be forgotten!

Cheers
Bernd

PS: If you have an enterprise subscription make sure you raise a support request with a reference to this post. That way it can be easily tracked and is channeled best internally.

Thank you for your reply. Unfortenately my boss finally didn’t plan to take entreprise version after receiving details from your business guy.

Great to see that you reproduce and plan to supporte the BPMN definition.

Another strange behaviour with MI sub process, the compensate order is not keep. If we have 2 taks with compensate, next a MI sub process and next another MI sub process and an compensation end event, the compensation is not done in reverse order but the two task first are compensate first, next the first MI and the second.

Cheers
JĂ©rĂ´me

Could you provide a test case in order to show the exact situation you are referring to?

I failed to reproduce with your camunda test unit project. My bug (compensation order) is only reproductible with Camunda 7.6. It works for 7.7.

I remember that we fixed something in this area “recently” - so that might have been in 7.7 :slight_smile: Glad to hear it is already fixed.

1 Like