activity.setActivityBehavior(new CancelEndEventActivityBehavior());
}
} else if (terminateEventDefinition != null) {
activity.setActivityBehavior(new TerminateEndEventActivityBehavior());
} else { // default: none end event
activity.setActivityBehavior(new NoneEndEventActivityBehavior());
}
for (BpmnParseListener parseListener : parseListeners) {
parseListener.parseEndEvent(endEventElement, scope, activity);
}