use of org.camunda.bpm.engine.impl.bpmn.delegate.ExecutionListenerInvocation in project camunda-bpm-platform by camunda.
the class ClassDelegateExecutionListener method notify.
// Execution listener
public void notify(DelegateExecution execution) throws Exception {
ExecutionListener executionListenerInstance = getExecutionListenerInstance();
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(new ExecutionListenerInvocation(executionListenerInstance, execution));
}
use of org.camunda.bpm.engine.impl.bpmn.delegate.ExecutionListenerInvocation in project camunda-bpm-platform by camunda.
the class DelegateExpressionExecutionListener method notify.
public void notify(DelegateExecution execution) throws Exception {
// Note: we can't cache the result of the expression, because the
// execution can change: eg. delegateExpression='${mySpringBeanFactory.randomSpringBean()}'
Object delegate = expression.getValue(execution);
applyFieldDeclaration(fieldDeclarations, delegate);
if (delegate instanceof ExecutionListener) {
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(new ExecutionListenerInvocation((ExecutionListener) delegate, execution));
} else if (delegate instanceof JavaDelegate) {
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(new JavaDelegateInvocation((JavaDelegate) delegate, execution));
} else {
throw LOG.resolveDelegateExpressionException(expression, ExecutionListener.class, JavaDelegate.class);
}
}
Aggregations