use of org.activiti.cdi.annotation.CompleteTask in project Activiti by Activiti.
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 ActivitiCdiException("Error while completing task: " + e.getCause().getMessage(), e.getCause());
}
}
Aggregations