@SuppressWarnings("rawtypes") public AbstractFlowNodeBuilder connectTo(String identifier) { ModelElementInstance target = modelInstance.getModelElementById(identifier); if (target == null) { throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause it not exists."); } else if (!(target instanceof FlowNode)) { throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause its not a flow node."); } else { FlowNode targetNode = (FlowNode) target; connectTarget(targetNode); return targetNode.builder(); } }
public Gateway findLastGateway() { FlowNode lastGateway = element; while (true) { try { lastGateway = lastGateway.getPreviousNodes().singleResult(); if (lastGateway instanceof Gateway) { return (Gateway) lastGateway; } } catch (BpmnModelException e) { throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e); } } }
private Set<String> getDefinitionSequenceFlowIds() { final Set<String> definitionFlowNodeIds = new HashSet<String>(); for (FlowNode activity : definitionFlowNodes) { definitionFlowNodeIds.add(activity.getId()); } return definitionFlowNodeIds; }
@SuppressWarnings("rawtypes") public AbstractFlowNodeBuilder connectTo(String identifier) { ModelElementInstance target = modelInstance.getModelElementById(identifier); if (target == null) { throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause it not exists."); } else if (!(target instanceof FlowNode)) { throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause its not a flow node."); } else { FlowNode targetNode = (FlowNode) target; connectTarget(targetNode); return targetNode.builder(); } }
@SuppressWarnings("rawtypes") public AbstractFlowNodeBuilder connectTo(String identifier) { ModelElementInstance target = modelInstance.getModelElementById(identifier); if (target == null) { throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause it not exists."); } else if (!(target instanceof FlowNode)) { throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause its not a flow node."); } else { FlowNode targetNode = (FlowNode) target; connectTarget(targetNode); return targetNode.builder(); } }
public Gateway findLastGateway() { FlowNode lastGateway = element; while (true) { try { lastGateway = lastGateway.getPreviousNodes().singleResult(); if (lastGateway instanceof Gateway) { return (Gateway) lastGateway; } } catch (BpmnModelException e) { throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e); } } }
public Gateway findLastGateway() { FlowNode lastGateway = element; while (true) { try { lastGateway = lastGateway.getPreviousNodes().singleResult(); if (lastGateway instanceof Gateway) { return (Gateway) lastGateway; } } catch (BpmnModelException e) { throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e); } } }
private void addEventToCoverage(ProcessDefinition processDefinition, FlowNode node) { if (node instanceof IntermediateThrowEvent) { final CoveredFlowNode coveredElement = new CoveredFlowNode(processDefinition.getKey(), node.getId()); // We consider entered throw elements as also ended coveredElement.setEnded(true); coverageTestRunState.addCoveredElement(coveredElement); } }