@Override public Artifact getArtifact(String id) { Artifact foundArtifact = null; for (Artifact artifact : artifactList) { if (id.equals(artifact.getId())) { foundArtifact = artifact; break; } } return foundArtifact; }
@Override public Artifact getArtifact(String id) { Artifact foundArtifact = null; for (Artifact artifact : artifactList) { if (id.equals(artifact.getId())) { foundArtifact = artifact; break; } } return foundArtifact; }
@Override public Artifact getArtifact(String id) { Artifact foundArtifact = null; for (Artifact artifact : artifactList) { if (id.equals(artifact.getId())) { foundArtifact = artifact; break; } } return foundArtifact; }
@Override public Artifact getArtifact(String id) { Artifact foundArtifact = null; for (Artifact artifact : artifactList) { if (id.equals(artifact.getId())) { foundArtifact = artifact; break; } } return foundArtifact; }
protected void ensureArtifactIdSet(Artifact artifact) { // We really must have ids for sequence flow to be able to generate stuff if (artifact.getId() == null) { artifact.setId("artifact-" + UUID.randomUUID().toString()); } }
protected void processArtifacts(Collection<Artifact> artifactList, BpmnModel model, ArrayNode elementArray, ArrayNode flowArray, GraphicInfo diagramInfo) { for (Artifact artifact : artifactList) { if (artifact instanceof Association) { ObjectNode elementNode = objectMapper.createObjectNode(); Association flow = (Association) artifact; elementNode.put("id", flow.getId()); elementNode.put("type", "association"); elementNode.put("sourceRef", flow.getSourceRef()); elementNode.put("targetRef", flow.getTargetRef()); fillWaypoints(flow.getId(), model, elementNode, diagramInfo); flowArray.add(elementNode); } else { ObjectNode elementNode = objectMapper.createObjectNode(); elementNode.put("id", artifact.getId()); if (artifact instanceof TextAnnotation) { TextAnnotation annotation = (TextAnnotation) artifact; elementNode.put("text", annotation.getText()); } GraphicInfo graphicInfo = model.getGraphicInfo(artifact.getId()); if (graphicInfo != null) { fillGraphicInfo(elementNode, graphicInfo, true); fillDiagramInfo(graphicInfo, diagramInfo); } String className = artifact.getClass().getSimpleName(); elementNode.put("type", className); elementArray.add(elementNode); } } }
handledArtifacts.put(artifact.getId(), artifact);
Association association= (Association) artifact; if (association.getSourceRef().equals(flowNode.getId())){ outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(artifact.getId()));
lane.getFlowReferences().add(artifact.getId()); lane.getParentProcess().addArtifact(artifact);