public Query<FlowNode> getSucceedingNodes() { Collection<FlowNode> succeedingNodes = new HashSet<FlowNode>(); for (SequenceFlow sequenceFlow : getOutgoing()) { succeedingNodes.add(sequenceFlow.getTarget()); } return new QueryImpl<FlowNode>(succeedingNodes); }
protected void setWaypoints(BpmnEdge edge) { BaseElement bpmnElement = edge.getBpmnElement(); FlowNode edgeSource; FlowNode edgeTarget; if (bpmnElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) bpmnElement; edgeSource = sequenceFlow.getSource(); edgeTarget = sequenceFlow.getTarget(); } else if (bpmnElement instanceof Association){ Association association = (Association) bpmnElement; edgeSource = (FlowNode) association.getSource(); edgeTarget = (FlowNode) association.getTarget(); } else { throw new RuntimeException("Bpmn element type not supported"); } setWaypointsWithSourceAndTarget(edge, edgeSource, edgeTarget); }
SequenceFlow last = sequenceFlows[outgoing.size() - 1]; BpmnShape targetShape = findBpmnShape(last.getTarget()); if (targetShape != null) { Bounds targetBounds = targetShape.getBounds();
public Query<FlowNode> getSucceedingNodes() { Collection<FlowNode> succeedingNodes = new HashSet<FlowNode>(); for (SequenceFlow sequenceFlow : getOutgoing()) { succeedingNodes.add(sequenceFlow.getTarget()); } return new QueryImpl<FlowNode>(succeedingNodes); }
public Query<FlowNode> getSucceedingNodes() { Collection<FlowNode> succeedingNodes = new HashSet<FlowNode>(); for (SequenceFlow sequenceFlow : getOutgoing()) { succeedingNodes.add(sequenceFlow.getTarget()); } return new QueryImpl<FlowNode>(succeedingNodes); }
protected void setWaypoints(BpmnEdge edge) { BaseElement bpmnElement = edge.getBpmnElement(); FlowNode edgeSource; FlowNode edgeTarget; if (bpmnElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) bpmnElement; edgeSource = sequenceFlow.getSource(); edgeTarget = sequenceFlow.getTarget(); } else if (bpmnElement instanceof Association){ Association association = (Association) bpmnElement; edgeSource = (FlowNode) association.getSource(); edgeTarget = (FlowNode) association.getTarget(); } else { throw new RuntimeException("Bpmn element type not supported"); } setWaypointsWithSourceAndTarget(edge, edgeSource, edgeTarget); }
protected void setWaypoints(BpmnEdge edge) { BaseElement bpmnElement = edge.getBpmnElement(); FlowNode edgeSource; FlowNode edgeTarget; if (bpmnElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) bpmnElement; edgeSource = sequenceFlow.getSource(); edgeTarget = sequenceFlow.getTarget(); } else if (bpmnElement instanceof Association){ Association association = (Association) bpmnElement; edgeSource = (FlowNode) association.getSource(); edgeTarget = (FlowNode) association.getTarget(); } else { throw new RuntimeException("Bpmn element type not supported"); } setWaypointsWithSourceAndTarget(edge, edgeSource, edgeTarget); }
final BpmnElement flowElement = elementMap.get(flow.getId()); final BpmnElement srcElement = elementMap.get(flow.getSource().getId()); final BpmnElement destElement = elementMap.get(flow.getTarget().getId());
SequenceFlow last = sequenceFlows[outgoing.size() - 1]; BpmnShape targetShape = findBpmnShape(last.getTarget()); if (targetShape != null) { Bounds targetBounds = targetShape.getBounds();
SequenceFlow last = sequenceFlows[outgoing.size() - 1]; BpmnShape targetShape = findBpmnShape(last.getTarget()); if (targetShape != null) { Bounds targetBounds = targetShape.getBounds();
/** * Events aren't reported like SequenceFlows and Activities, so we need * special handling. If a sequence flow has an event as the source or the * target, we add it to the coverage. It's pretty straight forward if a * sequence flow is active, then it's source has been covered anyway and it * will most definitely arrive at its target. * * @param transitionId * @param processDefinition * @param repositoryService */ private void handleEvent(String transitionId, ProcessDefinition processDefinition, RepositoryService repositoryService) { final BpmnModelInstance modelInstance = repositoryService.getBpmnModelInstance(processDefinition.getId()); final ModelElementInstance modelElement = modelInstance.getModelElementById(transitionId); if (modelElement.getElementType().getInstanceType() == SequenceFlow.class) { final SequenceFlow sequenceFlow = (SequenceFlow) modelElement; // If there is an event at the sequence flow source add it to the // coverage final FlowNode source = sequenceFlow.getSource(); addEventToCoverage(processDefinition, source); // If there is an event at the sequence flow target add it to the // coverage final FlowNode target = sequenceFlow.getTarget(); addEventToCoverage(processDefinition, target); } }