Hello,
using Flowable v6.4.2 in one Tomcat server, we’ve noticed that when selecting a TaskActivityBehavior is marked as triggerable the method run() under ContinueProcessOperation class is called twice, one for the sequence flow and another one for the FlowNode. In our project, we are extending TaskActivityBehavior and overriding both trigger and execute methods.
Sample class:
public abstract class AbstractTaskActivityBehavior extends TaskActivityBehavior {
public abstract void behaviorExecute(DelegateExecution execution) throws Exception;
@Override
public void execute(DelegateExecution execution) {
try {
//Inner app logic
behaviorExecute(execution);
} catch (Exception e) {
log.error(e.getMessage(), e);
} finally {
FlowableLoggerUtils.logFlowableExecutionInfoMessage(log,
execution, finalMessage + getDisplayName());
}
}@Override
public void trigger(DelegateExecution execution, String signalName, Object signalData) {
//Logic for finishing this task
log.info("Doing leave of task " + this.getClass().getSimpleName());
leave(execution);
}
}
However, if we uncheck trigger check box in the workflow diagram, the execute method in ServiceTaskJavaDelegateActivityBehavior is called once.*
Please advise,
Regards,
Jorge