@Override public EventGateway clone() { EventGateway clone = new EventGateway(); clone.setValues(this); return clone; }
@Override protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) { EventGateway gateway = new EventGateway(); return gateway; } }
@Override protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) { List<EventGateway> eventGateways = process.findFlowElementsOfType(EventGateway.class); for (EventGateway eventGateway : eventGateways) { for (SequenceFlow sequenceFlow : eventGateway.getOutgoingFlows()) { FlowElement flowElement = process.getFlowElement(sequenceFlow.getTargetRef(), true); if (flowElement != null && !(flowElement instanceof IntermediateCatchEvent)) { addError(errors, Problems.EVENT_GATEWAY_ONLY_CONNECTED_TO_INTERMEDIATE_EVENTS, process, eventGateway, "Event based gateway can only be connected to elements of type intermediateCatchEvent"); } } } }
@Override protected void executeParse(BpmnParse bpmnParse, EventGateway gateway) { ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_EVENT); activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createEventBasedGatewayActivityBehavior(gateway)); activity.setAsync(gateway.isAsynchronous()); activity.setExclusive(!gateway.isNotExclusive()); activity.setScope(true); }
@Override protected void executeParse(BpmnParse bpmnParse, EventGateway gateway) { gateway.setBehavior(bpmnParse.getActivityBehaviorFactory().createEventBasedGatewayActivityBehavior(gateway)); }
@Override protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception { EventGateway gateway = new EventGateway(); BpmnXMLUtil.addXMLLocation(gateway, xtr); parseChildElements(getXMLElementName(), gateway, model, xtr); return gateway; }
List<SequenceFlow> outgoingSequenceFlows = eventGateway.getOutgoingFlows(); Set<String> eventActivityIds = new HashSet<>(outgoingSequenceFlows.size() - 1); // -1, the event being triggered does not need to be deleted for (SequenceFlow outgoingSequenceFlow : outgoingSequenceFlows) {
@Override public EventGateway clone() { EventGateway clone = new EventGateway(); clone.setValues(this); return clone; }