use of org.camunda.bpm.engine.impl.core.variable.scope.VariableInstanceLifecycleListener in project camunda-bpm-platform by camunda.
the class CaseExecutionEntity method remove.
// delete/remove ///////////////////////////////////////////////////////
@SuppressWarnings({ "unchecked", "rawtypes" })
public void remove() {
super.remove();
for (VariableInstanceEntity variableInstance : variableStore.getVariables()) {
invokeVariableLifecycleListenersDelete(variableInstance, this, Arrays.<VariableInstanceLifecycleListener<CoreVariableInstance>>asList((VariableInstanceLifecycleListener) VariableInstanceEntityPersistenceListener.INSTANCE));
variableStore.removeVariable(variableInstance.getName());
}
CommandContext commandContext = Context.getCommandContext();
for (CaseSentryPartEntity sentryPart : getCaseSentryParts()) {
commandContext.getCaseSentryPartManager().deleteSentryPart(sentryPart);
}
// finally delete this execution
commandContext.getCaseExecutionManager().deleteCaseExecution(this);
}
Aggregations