use of org.camunda.bpm.engine.impl.cmmn.delegate.CaseExecutionListenerInvocation in project camunda-bpm-platform by camunda.
the class DelegateExpressionCaseExecutionListener method notify.
public void notify(DelegateCaseExecution caseExecution) throws Exception {
// Note: we can't cache the result of the expression, because the
// caseExecution can change: eg. delegateExpression='${mySpringBeanFactory.randomSpringBean()}'
Object delegate = expression.getValue(caseExecution);
applyFieldDeclaration(fieldDeclarations, delegate);
if (delegate instanceof CaseExecutionListener) {
CaseExecutionListener listenerInstance = (CaseExecutionListener) delegate;
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(new CaseExecutionListenerInvocation(listenerInstance, caseExecution));
} else {
throw new ProcessEngineException("Delegate expression " + expression + " did not resolve to an implementation of " + CaseExecutionListener.class);
}
}
use of org.camunda.bpm.engine.impl.cmmn.delegate.CaseExecutionListenerInvocation in project camunda-bpm-platform by camunda.
the class ClassDelegateCaseExecutionListener method notify.
public void notify(DelegateCaseExecution caseExecution) throws Exception {
CaseExecutionListener listenerInstance = getListenerInstance();
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(new CaseExecutionListenerInvocation(listenerInstance, caseExecution));
}
Aggregations