protected String getCurrentFlowElementId() { FlowElement flowElement = getExecutionEntity().getCurrentFlowElement(); if (flowElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) flowElement; return sequenceFlow.getSourceRef() + " -> " + sequenceFlow.getTargetRef(); } else if (flowElement != null) { return flowElement.getId() + " (" + flowElement.getClass().getSimpleName(); } else { return ""; } }
Object sourceVertex = generatedVertices.get(sequenceFlow.getSourceRef()); Object targetVertex = generatedVertices.get(sequenceFlow.getTargetRef()); if (handledFlowElements.get(sequenceFlow.getSourceRef()) instanceof BoundaryEvent) {
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; }
@Override protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception { SequenceFlow sequenceFlow = (SequenceFlow) element; writeDefaultAttribute(ATTRIBUTE_FLOW_SOURCE_REF, sequenceFlow.getSourceRef(), xtw); writeDefaultAttribute(ATTRIBUTE_FLOW_TARGET_REF, sequenceFlow.getTargetRef(), xtw); if (StringUtils.isNotEmpty(sequenceFlow.getSkipExpression())) { writeDefaultAttribute(ATTRIBUTE_FLOW_SKIP_EXPRESSION, sequenceFlow.getSkipExpression(), xtw); } }
ArrayNode dockersArrayNode = objectMapper.createArrayNode(); ObjectNode dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(sequenceFlow.getSourceRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(sequenceFlow.getSourceRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode); if (StringUtils.isNotEmpty(sequenceFlow.getSourceRef())) { FlowElement sourceFlowElement = container.getFlowElement(sequenceFlow.getSourceRef()); if (sourceFlowElement != null) { String defaultFlowId = null;
protected void executeParse(BpmnParse bpmnParse, SequenceFlow sequenceFlow) { org.activiti.bpmn.model.Process process = bpmnParse.getCurrentProcess(); sequenceFlow.setSourceFlowElement(process.getFlowElement(sequenceFlow.getSourceRef(), true)); sequenceFlow.setTargetFlowElement(process.getFlowElement(sequenceFlow.getTargetRef(), true)); }
if (flowElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) flowElement; FlowNode sourceNode = getFlowNodeFromScope(sequenceFlow.getSourceRef(), parentScope); if (sourceNode != null) { sourceNode.getOutgoingFlows().add(sequenceFlow);
FlowElement sourceElement = handledFlowElements.get(sequenceFlows.get(sequenceFlowId).getSourceRef()); if (sourceElement instanceof Gateway && ((Gateway) sourceElement).getOutgoingFlows().size() > 1) { mxPoint startPoint = points.get(0);
} else if (flowElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) flowElement; FlowElement sourceFlowElement = parentContainer.getFlowElement(sequenceFlow.getSourceRef()); if (sourceFlowElement != null && sourceFlowElement instanceof FlowNode) {
for (SequenceFlow sequenceFlow : sequenceFlows) { String sourceRef = sequenceFlow.getSourceRef(); String targetRef = sequenceFlow.getTargetRef();
for (FlowElement flowElement : process.findFlowElementsOfType(SequenceFlow.class)) { SequenceFlow sequenceFlow = (SequenceFlow) flowElement; if (subShapesMap.containsKey(sequenceFlow.getSourceRef())) { SubProcess subProcess = subShapesMap.get(sequenceFlow.getSourceRef()); if (subProcess.getFlowElement(sequenceFlow.getId()) == null) { subProcess.addFlowElement(sequenceFlow);
if (flowElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) flowElement; lookForElement = model.getFlowElement(sequenceFlow.getSourceRef()); } else { lookForElement = flowElement;
String sourceRef = sequenceFlow.getSourceRef(); String targetRef = sequenceFlow.getTargetRef(); FlowElement sourceElement = bpmnModel.getFlowElement(sourceRef);
String sourceRef = sequenceFlow.getSourceRef(); String targetRef = sequenceFlow.getTargetRef(); FlowElement sourceElement = bpmnModel.getFlowElement(sourceRef);
public static List<FlowElement> findSucessorFlowElementsFor( Process process, FlowElement sourceFlowElement) { List<FlowElement> successors = new ArrayList<FlowElement>(); for (SequenceFlow sequenceFlow : process.findFlowElementsOfType(SequenceFlow.class)) { if (sequenceFlow.getSourceRef().equals(sourceFlowElement.getId())) { successors.add(process.getFlowElement(sequenceFlow.getTargetRef())); } } return successors; }
protected String getCurrentFlowElementId() { FlowElement flowElement = getExecutionEntity().getCurrentFlowElement(); if (flowElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) flowElement; return sequenceFlow.getSourceRef() + " -> " + sequenceFlow.getTargetRef(); } else if (flowElement != null) { return flowElement.getId() + " (" + flowElement.getClass().getSimpleName(); } else { return ""; } }
@Override protected void writeAdditionalAttributes(BaseElement element, XMLStreamWriter xtw) throws Exception { SequenceFlow sequenceFlow = (SequenceFlow) element; writeDefaultAttribute(ATTRIBUTE_FLOW_SOURCE_REF, sequenceFlow.getSourceRef(), xtw); writeDefaultAttribute(ATTRIBUTE_FLOW_TARGET_REF, sequenceFlow.getTargetRef(), xtw); }
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 void processSequenceFlows() { for (SequenceFlow sequenceFlow : sequenceFlows) { Node sourceNode = nodeMap.get(sequenceFlow.getSourceRef()); Node targetNode = nodeMap.get(sequenceFlow.getTargetRef()); Relationship sequenceflowRelationship = sourceNode.createRelationshipTo(targetNode, RelTypes.SEQ_FLOW); sequenceflowRelationship.setProperty("id", sequenceFlow.getId()); if (sequenceFlow.getConditionExpression() != null) { sequenceflowRelationship.setProperty("condition", sequenceFlow.getConditionExpression()); } } }
protected void executeParse(BpmnParse bpmnParse, SequenceFlow sequenceFlow) { org.activiti.bpmn.model.Process process = bpmnParse.getCurrentProcess(); sequenceFlow.setSourceFlowElement(process.getFlowElement(sequenceFlow.getSourceRef(), true)); sequenceFlow.setTargetFlowElement(process.getFlowElement(sequenceFlow.getTargetRef(), true)); }