Task completion and roll back

In a CMMN process,with a sequence of stages and tasks in them, suppose a user is presented with some tasks, but she/he makes a mistake and completes the incorrect task. What would be a strategy to roll this back? I think I can programatically create a new task to replace the wrongly completed one, but what if this task caused the stage to also complete and open the next one?

The engines (both bpmn/cmmn) won’t allow this through the regular user API’s, as this would effectively change the audit history.

However, there is a lower-level API, where you can migrate case instance state to another state. Have a look at the test example here: https://github.com/flowable/flowable-engine/blob/master/modules/flowable-cmmn-engine/src/test/java/org/flowable/cmmn/test/dynamic/ChangeStateTest.java

1 Like