public void createBPMNEdge(String key, List<GraphicInfo> graphicList) { FlowElement flowElement = bpmnModel.getFlowElement(key); if (flowElement != null && sequenceFlows.containsKey(key)) { TransitionImpl sequenceFlow = sequenceFlows.get(key); List<Integer> waypoints = new ArrayList<>(); for (GraphicInfo waypointInfo : graphicList) { waypoints.add((int) waypointInfo.getX()); waypoints.add((int) waypointInfo.getY()); } sequenceFlow.setWaypoints(waypoints); } else if (bpmnModel.getArtifact(key) != null) { // it's an association, so nothing to do } else { LOGGER.warn("Invalid reference in 'bpmnElement' attribute, sequenceFlow {} not found", key); } }
protected void createAssociation(BpmnParse bpmnParse, Association association) { BpmnModel bpmnModel = bpmnParse.getBpmnModel(); if (bpmnModel.getArtifact(association.getSourceRef()) != null || bpmnModel.getArtifact(association.getTargetRef()) != null) {
public void createBPMNEdge(String key, List<GraphicInfo> graphicList) { FlowElement flowElement = bpmnModel.getFlowElement(key); if (flowElement instanceof SequenceFlow) { SequenceFlow sequenceFlow = (SequenceFlow) flowElement; List<Integer> waypoints = new ArrayList<>(); for (GraphicInfo waypointInfo : graphicList) { waypoints.add((int) waypointInfo.getX()); waypoints.add((int) waypointInfo.getY()); } sequenceFlow.setWaypoints(waypoints); } else if (bpmnModel.getArtifact(key) != null) { // it's an association, so nothing to do } else { LOGGER.warn("Invalid reference in 'bpmnElement' attribute, sequenceFlow {} not found", key); } }
if (bpmnModel.getFlowElement(bpmnReference) == null) { if (bpmnModel.getArtifact(bpmnReference) == null) { if (bpmnModel.getFlowElement(bpmnReference) == null) { if (bpmnModel.getArtifact(bpmnReference) == null) { LOGGER.warn("Invalid reference in diagram interchange definition: could not find {}", bpmnReference);
Artifact artifact = model.getArtifact(elementId); if (artifact instanceof Association) { Association association = (Association) artifact; if (model.getFlowElement(elementId) != null || model.getArtifact(elementId) != null || model.getPool(elementId) != null || model.getLane(elementId) != null) { if (model.getFlowElement(elementId) != null || model.getArtifact(elementId) != null || model.getMessageFlow(elementId) != null) { createBpmnEdge(model, elementId,xtw);
protected void createAssociation(BpmnParse bpmnParse, Association association, ScopeImpl parentScope) { BpmnModel bpmnModel = bpmnParse.getBpmnModel(); if (bpmnModel.getArtifact(association.getSourceRef()) != null || bpmnModel.getArtifact(association.getTargetRef()) != null) { // connected to a text annotation so skipping it return; } ActivityImpl sourceActivity = parentScope.findActivity(association.getSourceRef()); ActivityImpl targetActivity = parentScope.findActivity(association.getTargetRef()); // an association may reference elements that are not parsed as activities (like for instance // text annotations so do not throw an exception if sourceActivity or targetActivity are null) // However, we make sure they reference 'something': if (sourceActivity == null) { // bpmnModel.addProblem("Invalid reference sourceRef '" + association.getSourceRef() + "' of association element ", association.getId()); } else if (targetActivity == null) { // bpmnModel.addProblem("Invalid reference targetRef '" + association.getTargetRef() + "' of association element ", association.getId()); } else { if (sourceActivity.getProperty("type").equals("compensationBoundaryCatch")) { Object isForCompensation = targetActivity.getProperty(PROPERTYNAME_IS_FOR_COMPENSATION); if (isForCompensation == null || !(Boolean) isForCompensation) { LOGGER.warn("compensation boundary catch must be connected to element with isForCompensation=true"); } else { ActivityImpl compensatedActivity = sourceActivity.getParentActivity(); compensatedActivity.setProperty(BpmnParse.PROPERTYNAME_COMPENSATION_HANDLER_ID, targetActivity.getId()); } } } }
if (bpmnModel.getFlowElement(bpmnReference) == null) { if (bpmnModel.getArtifact(bpmnReference) == null) { if (bpmnModel.getFlowElement(bpmnReference) == null) { if (bpmnModel.getArtifact(bpmnReference) == null) { LOGGER.warn("Invalid reference in diagram interchange definition: could not find {}", bpmnReference);
if (bpmnModel.getArtifact(bpmnReference) == null) { if (bpmnModel.getArtifact(bpmnReference) == null) { addWarning(errors, Problems.DI_INVALID_REFERENCE, null, bpmnModel.getFlowElement(bpmnReference), "Invalid reference in diagram interchange definition: could not find " + bpmnReference);