return ELEMENT_EVENT_BOUNDARY;
}
@Override
protected BaseElement convertXMLToElement(XMLStreamReader xtr) {
BoundaryEvent boundaryEvent = new BoundaryEvent();
if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_BOUNDARY_CANCELACTIVITY))) {
String cancelActivity = xtr.getAttributeValue(null, ATTRIBUTE_BOUNDARY_CANCELACTIVITY);
if (ATTRIBUTE_VALUE_TRUE.equalsIgnoreCase(cancelActivity)) {
boundaryEvent.setCancelActivity(true);
}
}
boundaryEvent.setAttachedToRefId(xtr.getAttributeValue(null, ATTRIBUTE_BOUNDARY_ATTACHEDTOREF));
parseChildElements(getXMLElementName(), boundaryEvent, xtr);
// Explicitly set cancel activity to false for error boundary events
if (boundaryEvent.getEventDefinitions().size() == 1) {
EventDefinition eventDef = boundaryEvent.getEventDefinitions().get(0);
if (eventDef instanceof ErrorEventDefinition) {
boundaryEvent.setCancelActivity(false);
}
}
return boundaryEvent;
}