public void setValues(ErrorEventDefinition otherDefinition) { super.setValues(otherDefinition); setErrorCode(otherDefinition.getErrorCode()); } }
public void setValues(ErrorEventDefinition otherDefinition) { super.setValues(otherDefinition); setErrorCode(otherDefinition.getErrorCode()); } }
@Override public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (!(parentElement instanceof Event)) return; ErrorEventDefinition eventDefinition = new ErrorEventDefinition(); BpmnXMLUtil.addXMLLocation(eventDefinition, xtr); eventDefinition.setErrorCode(xtr.getAttributeValue(null, "errorRef")); BpmnXMLUtil.parseChildElements(ELEMENT_EVENT_ERRORDEFINITION, eventDefinition, xtr, model); ((Event) parentElement).getEventDefinitions().add(eventDefinition); } }
protected void convertJsonToErrorDefinition(JsonNode objectNode, Event event) { String errorRef = getPropertyValueAsString(PROPERTY_ERRORREF, objectNode); ErrorEventDefinition eventDefinition = new ErrorEventDefinition(); eventDefinition.setErrorCode(errorRef); event.getEventDefinitions().add(eventDefinition); }
errorDefinition.setErrorCode(errorCode);
@Override protected void executeParse(BpmnParse bpmnParse, ErrorEventDefinition eventDefinition) { ErrorEventDefinition modelErrorEvent = eventDefinition; if (bpmnParse.getBpmnModel().containsErrorRef(modelErrorEvent.getErrorCode())) { String errorCode = bpmnParse.getBpmnModel().getErrors().get(modelErrorEvent.getErrorCode()); modelErrorEvent.setErrorCode(errorCode); } ScopeImpl scope = bpmnParse.getCurrentScope(); ActivityImpl activity = bpmnParse.getCurrentActivity(); if (bpmnParse.getCurrentFlowElement() instanceof StartEvent) { if (scope.getProperty(PROPERTYNAME_INITIAL) == null) { scope.setProperty(PROPERTYNAME_INITIAL, activity); // the scope of the event subscription is the parent of the event // subprocess (subscription must be created when parent is initialized) ScopeImpl catchingScope = ((ActivityImpl) scope).getParent(); createErrorStartEventDefinition(modelErrorEvent, activity, catchingScope); } } else if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement(); boolean interrupting = true; // non-interrupting not yet supported activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryEventActivityBehavior(boundaryEvent, interrupting, activity)); ActivityImpl parentActivity = scope.findActivity(boundaryEvent.getAttachedToRefId()); createBoundaryErrorEventDefinition(modelErrorEvent, interrupting, parentActivity, activity); } }