protected void connectTargetWithAssociation(FlowNode target) { Association association = modelInstance.newInstance(Association.class); association.setTarget(target); association.setSource(element); association.setAssociationDirection(AssociationDirection.One); element.getParentElement().addChildElement(association); createEdge(association); }
public ModifiableBpmnModelInstance removeFlowNode(String flowNodeId) { FlowNode flowNode = getModelElementById(flowNodeId); ModelElementInstance scope = flowNode.getParentElement(); for (SequenceFlow outgoingFlow : flowNode.getOutgoing()) { removeBpmnEdge(outgoingFlow); scope.removeChildElement(outgoingFlow); } for (SequenceFlow incomingFlow : flowNode.getIncoming()) { removeBpmnEdge(incomingFlow); scope.removeChildElement(incomingFlow); } Collection<Association> associations = scope.getChildElementsByType(Association.class); for (Association association : associations) { if (flowNode.equals(association.getSource()) || flowNode.equals(association.getTarget())) { removeBpmnEdge(association); scope.removeChildElement(association); } } removeBpmnShape(flowNode); scope.removeChildElement(flowNode); return this; }
protected void connectTargetWithAssociation(FlowNode target) { Association association = modelInstance.newInstance(Association.class); association.setTarget(target); association.setSource(element); association.setAssociationDirection(AssociationDirection.One); element.getParentElement().addChildElement(association); createEdge(association); }
protected void connectTargetWithAssociation(FlowNode target) { Association association = modelInstance.newInstance(Association.class); association.setTarget(target); association.setSource(element); association.setAssociationDirection(AssociationDirection.One); element.getParentElement().addChildElement(association); createEdge(association); }
public ModifiableBpmnModelInstance removeFlowNode(String flowNodeId) { FlowNode flowNode = getModelElementById(flowNodeId); ModelElementInstance scope = flowNode.getParentElement(); for (SequenceFlow outgoingFlow : flowNode.getOutgoing()) { removeBpmnEdge(outgoingFlow); scope.removeChildElement(outgoingFlow); } for (SequenceFlow incomingFlow : flowNode.getIncoming()) { removeBpmnEdge(incomingFlow); scope.removeChildElement(incomingFlow); } Collection<Association> associations = scope.getChildElementsByType(Association.class); for (Association association : associations) { if (flowNode.equals(association.getSource()) || flowNode.equals(association.getTarget())) { removeBpmnEdge(association); scope.removeChildElement(association); } } removeBpmnShape(flowNode); scope.removeChildElement(flowNode); return this; }