public void cancel() { super.cancel(); if (updates!=null) { getUpdates().isActivityInstancesChanged = true; getUpdates().isEndStateChanged = true; getUpdates().isEndChanged = true; WorkflowInstanceStore workflowInstanceStore = configuration.get(WorkflowInstanceStore.class); workflowInstanceStore.flushAndUnlock(this); } }