Search in sources :

Example 1 with TerminateEndEventActivityBehavior

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;
}
Also used : TerminateEventDefinition(org.activiti.bpmn.model.TerminateEventDefinition) TerminateEndEventActivityBehavior(org.activiti.engine.impl.bpmn.behavior.TerminateEndEventActivityBehavior)

Aggregations

TerminateEventDefinition (org.activiti.bpmn.model.TerminateEventDefinition)1 TerminateEndEventActivityBehavior (org.activiti.engine.impl.bpmn.behavior.TerminateEndEventActivityBehavior)1