protected EventGateway getPrecedingEventBasedGateway(DelegateExecution execution) { FlowElement currentFlowElement = execution.getCurrentFlowElement(); if (currentFlowElement instanceof IntermediateCatchEvent) { IntermediateCatchEvent intermediateCatchEvent = (IntermediateCatchEvent) currentFlowElement; List<SequenceFlow> incomingSequenceFlow = intermediateCatchEvent.getIncomingFlows(); // If behind an event based gateway, there is only one incoming sequence flow that originates from said gateway if (incomingSequenceFlow != null && incomingSequenceFlow.size() == 1) { SequenceFlow sequenceFlow = incomingSequenceFlow.get(0); FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement(); if (sourceFlowElement instanceof EventGateway) { return (EventGateway) sourceFlowElement; } } } return null; }
protected String getPrecedingEventBasedGateway(BpmnParse bpmnParse, IntermediateCatchEvent event) { String eventBasedGatewayId = null; for (SequenceFlow sequenceFlow : event.getIncomingFlows()) { FlowElement sourceElement = bpmnParse.getBpmnModel().getFlowElement(sequenceFlow.getSourceRef()); if (sourceElement instanceof EventGateway) { eventBasedGatewayId = sourceElement.getId(); break; } } return eventBasedGatewayId; }
protected EventGateway getPrecedingEventBasedGateway(DelegateExecution execution) { FlowElement currentFlowElement = execution.getCurrentFlowElement(); if (currentFlowElement instanceof IntermediateCatchEvent) { IntermediateCatchEvent intermediateCatchEvent = (IntermediateCatchEvent) currentFlowElement; List<SequenceFlow> incomingSequenceFlow = intermediateCatchEvent.getIncomingFlows(); // If behind an event based gateway, there is only one incoming sequence flow that originates from said gateway if (incomingSequenceFlow != null && incomingSequenceFlow.size() == 1) { SequenceFlow sequenceFlow = incomingSequenceFlow.get(0); FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement(); if (sourceFlowElement instanceof EventGateway) { return (EventGateway) sourceFlowElement; } } } return null; }
protected String getPrecedingEventBasedGateway(BpmnParse bpmnParse, IntermediateCatchEvent event) { String eventBasedGatewayId = null; for (SequenceFlow sequenceFlow : event.getIncomingFlows()) { FlowElement sourceElement = bpmnParse.getBpmnModel().getFlowElement(sequenceFlow.getSourceRef()); if (sourceElement instanceof EventGateway) { eventBasedGatewayId = sourceElement.getId(); break; } } return eventBasedGatewayId; }
protected String getPrecedingEventBasedGateway(BpmnParse bpmnParse, IntermediateCatchEvent event) { String eventBasedGatewayId = null; for (SequenceFlow sequenceFlow : event.getIncomingFlows()) { FlowElement sourceElement = bpmnParse.getBpmnModel().getFlowElement(sequenceFlow.getSourceRef()); if (sourceElement instanceof EventGateway) { eventBasedGatewayId = sourceElement.getId(); break; } } return eventBasedGatewayId; }