use of org.activiti.bpmn.model.ErrorEventDefinition in project Activiti by Activiti.
the class EndEventJsonConverter method getStencilId.
protected String getStencilId(BaseElement baseElement) {
EndEvent endEvent = (EndEvent) baseElement;
List<EventDefinition> eventDefinitions = endEvent.getEventDefinitions();
if (eventDefinitions.size() != 1) {
return STENCIL_EVENT_END_NONE;
}
EventDefinition eventDefinition = eventDefinitions.get(0);
if (eventDefinition instanceof ErrorEventDefinition) {
return STENCIL_EVENT_END_ERROR;
} else if (eventDefinition instanceof CancelEventDefinition) {
return STENCIL_EVENT_END_CANCEL;
} else if (eventDefinition instanceof TerminateEventDefinition) {
return STENCIL_EVENT_END_TERMINATE;
} else {
return STENCIL_EVENT_END_NONE;
}
}
use of org.activiti.bpmn.model.ErrorEventDefinition in project Activiti by Activiti.
the class BaseBpmnJsonConverter method convertJsonToErrorDefinition.
protected void convertJsonToErrorDefinition(JsonNode objectNode, Event event) {
String errorRef = getPropertyValueAsString(PROPERTY_ERRORREF, objectNode);
ErrorEventDefinition eventDefinition = new ErrorEventDefinition();
eventDefinition.setErrorRef(errorRef);
event.getEventDefinitions().add(eventDefinition);
}
Aggregations