use of org.camunda.bpm.engine.cdi.annotation.CompleteTask in project camunda-bpm-platform by camunda.
the class CompleteTaskInterceptor method invoke.
@AroundInvoke
public Object invoke(InvocationContext ctx) throws Exception {
try {
Object result = ctx.proceed();
CompleteTask completeTaskAnnotation = ctx.getMethod().getAnnotation(CompleteTask.class);
boolean endConversation = completeTaskAnnotation.endConversation();
businessProcess.completeTask(endConversation);
return result;
} catch (InvocationTargetException e) {
throw new ProcessEngineCdiException("Error while completing task: " + e.getCause().getMessage(), e.getCause());
}
}
Aggregations