how to cancel the last instance in multi Call Activity node

hi ,
In my case, i create a “public class HandleDataAfterListener implements ExecutionListener” . add EndEventListener in org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener#parseMultiInstanceLoopCharacteristics .
runtimeService.createProcessInstanceModification(“myProcessInstanceId”)
.startAfterActivity(“myMultiCANode#multiInstanceBody”)
.cancelActivityInstance(“lastInstanceID”)
.execute();
HandleDataAfterListener can’t be triggered when cancel the last instance in multi Call Activity node.
is there a correct way to cancel the last instance and trigger my HandleDataAfterListener?
thank you

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.