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); }
private SequenceFlowBuilder getCurrentSequenceFlowBuilder() { if (currentSequenceFlowBuilder == null) { SequenceFlow sequenceFlow = createSibling(SequenceFlow.class); currentSequenceFlowBuilder = sequenceFlow.builder(); } return currentSequenceFlowBuilder; }
/** * Sets the condition for this sequence flow. * * @param conditionExpression the condition expression for this sequence flow * @return the builder object */ public B condition(ConditionExpression conditionExpression) { element.setConditionExpression(conditionExpression); return myself; }
final Collection<BoundaryEvent> boundaryEvents, final Collection<SubProcess> subProcesses) { for (final SequenceFlow flow : flows) { final BpmnElement flowElement = elementMap.get(flow.getId()); final BpmnElement srcElement = elementMap.get(flow.getSource().getId()); final BpmnElement destElement = elementMap.get(flow.getTarget().getId()); final Collection<SequenceFlow> incomingFlows = subProcess.getIncoming(); for (final SequenceFlow incomingFlow : incomingFlows) { final BpmnElement srcElement = elementMap.get(incomingFlow.getId()); for (final StartEvent startEvent : startEvents) { final BpmnElement dstElement = elementMap.get(startEvent.getId()); final BpmnElement srcElement = elementMap.get(endEvent.getId()); for (final SequenceFlow outgoingFlow : outgoingFlows) { final BpmnElement dstElement = elementMap.get(outgoingFlow.getId()); graph.addEdge(srcElement, dstElement, 100); graph.removeEdge(subprocessElement, dstElement);
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> getPreviousNodes() { Collection<FlowNode> previousNodes = new HashSet<FlowNode>(); for (SequenceFlow sequenceFlow : getIncoming()) { previousNodes.add(sequenceFlow.getSource()); } return new QueryImpl<FlowNode>(previousNodes); }
/** * Sets the target flow node of this sequence flow. * * @param target the target of this sequence flow * @return the builder object */ public B to(FlowNode target) { element.setTarget(target); target.getIncoming().add(element); return myself; }
/** * Sets the source flow node of this sequence flow. * * @param source the source of this sequence flow * @return the builder object */ public B from(FlowNode source) { element.setSource(source); source.getOutgoing().add(element); return myself; }
if (baseElement instanceof SequenceFlow) { final SequenceFlow flow = (SequenceFlow) baseElement; BpmnModelElementInstance scopeElement = flow.getScope(); String scopeId = null; if (scopeElement != null) { scopeId = scopeElement.getAttributeValue(BpmnConstants.ATTR_ID); final ConditionExpression expression = flow.getConditionExpression(); if (expression != null) { if (expression.getLanguage() != null && expression.getLanguage().equals(ConfigConstants.GROOVY)) {
SequenceFlow last = sequenceFlows[outgoing.size() - 1]; BpmnShape targetShape = findBpmnShape(last.getTarget()); if (targetShape != null) { Bounds targetBounds = targetShape.getBounds();
private Set<SequenceFlow> getExecutableSequenceNodes(final Collection<SequenceFlow> sequenceFlows) { final HashSet<SequenceFlow> result = new HashSet<SequenceFlow>(); for (final SequenceFlow sequenceFlow : sequenceFlows) { if (definitionFlowNodes.contains(sequenceFlow.getSource())) { result.add(sequenceFlow); } } return result; }
/** * Sets the target flow node of this sequence flow. * * @param target the target of this sequence flow * @return the builder object */ public B to(FlowNode target) { element.setTarget(target); target.getIncoming().add(element); return myself; }
/** * Sets the source flow node of this sequence flow. * * @param source the source of this sequence flow * @return the builder object */ public B from(FlowNode source) { element.setSource(source); source.getOutgoing().add(element); return myself; }
private SequenceFlowBuilder getCurrentSequenceFlowBuilder() { if (currentSequenceFlowBuilder == null) { SequenceFlow sequenceFlow = createSibling(SequenceFlow.class); currentSequenceFlowBuilder = sequenceFlow.builder(); } return currentSequenceFlowBuilder; }
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); }
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> getPreviousNodes() { Collection<FlowNode> previousNodes = new HashSet<FlowNode>(); for (SequenceFlow sequenceFlow : getIncoming()) { previousNodes.add(sequenceFlow.getSource()); } return new QueryImpl<FlowNode>(previousNodes); }
/** * Sets the condition for this sequence flow. * * @param conditionExpression the condition expression for this sequence flow * @return the builder object */ public B condition(ConditionExpression conditionExpression) { element.setConditionExpression(conditionExpression); return myself; }
/** * Sets the target flow node of this sequence flow. * * @param target the target of this sequence flow * @return the builder object */ public B to(FlowNode target) { element.setTarget(target); target.getIncoming().add(element); return myself; }
/** * Sets the source flow node of this sequence flow. * * @param source the source of this sequence flow * @return the builder object */ public B from(FlowNode source) { element.setSource(source); source.getOutgoing().add(element); return myself; }