delegateVariable.setScopeExecution(currentExecution);
for (VariableListener<?> listener : listeners) {
try {
CaseVariableListener caseVariableListener = (CaseVariableListener) listener;
CaseVariableListenerInvocation invocation = new CaseVariableListenerInvocation(caseVariableListener, delegateVariable, currentExecution);
Context.getProcessEngineConfiguration()
.getDelegateInterceptor()
.handleInvocation(invocation);
} catch (Exception e) {
throw new ProcessEngineException("Variable listener invocation failed: "+e.getMessage(), e);