use of org.activiti.engine.impl.bpmn.behavior.TerminateEndEventActivityBehavior in project Activiti by Activiti.
the class DefaultActivityBehaviorFactory method createTerminateEndEventActivityBehavior.
public TerminateEndEventActivityBehavior createTerminateEndEventActivityBehavior(EndEvent endEvent) {
boolean terminateAll = false;
boolean terminateMultiInstance = false;
if (endEvent.getEventDefinitions() != null && endEvent.getEventDefinitions().size() > 0 && endEvent.getEventDefinitions().get(0) instanceof TerminateEventDefinition) {
terminateAll = ((TerminateEventDefinition) endEvent.getEventDefinitions().get(0)).isTerminateAll();
terminateMultiInstance = ((TerminateEventDefinition) endEvent.getEventDefinitions().get(0)).isTerminateMultiInstance();
}
TerminateEndEventActivityBehavior terminateEndEventActivityBehavior = new TerminateEndEventActivityBehavior();
terminateEndEventActivityBehavior.setTerminateAll(terminateAll);
terminateEndEventActivityBehavior.setTerminateMultiInstance(terminateMultiInstance);
return terminateEndEventActivityBehavior;
}
Aggregations