Пример #1
0
 private void assignLanes(NodeContainer nodeContainer, Map<String, String> laneMapping) {
   for (Node node : nodeContainer.getNodes()) {
     String lane = null;
     String uniqueId = (String) node.getMetaData().get("UniqueId");
     if (uniqueId != null) {
       lane = laneMapping.get(uniqueId);
     } else {
       lane = laneMapping.get(XmlBPMNProcessDumper.getUniqueNodeId(node));
     }
     if (lane != null) {
       ((NodeImpl) node).setMetaData("Lane", lane);
       if (node instanceof HumanTaskNode) {
         ((HumanTaskNode) node).setSwimlane(lane);
       }
     }
     if (node instanceof NodeContainer) {
       assignLanes((NodeContainer) node, laneMapping);
     }
   }
 }
Пример #2
0
 protected void writeIO(SubProcessNode subProcessNode, StringBuilder xmlDump) {
   xmlDump.append("      <ioSpecification>" + EOL);
   for (Map.Entry<String, String> entry : subProcessNode.getInMappings().entrySet()) {
     xmlDump.append(
         "        <dataInput id=\""
             + XmlBPMNProcessDumper.getUniqueNodeId(subProcessNode)
             + "_"
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "Input\" name=\""
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "\" />"
             + EOL);
   }
   for (Map.Entry<String, String> entry : subProcessNode.getOutMappings().entrySet()) {
     xmlDump.append(
         "        <dataOutput id=\""
             + XmlBPMNProcessDumper.getUniqueNodeId(subProcessNode)
             + "_"
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "Output\" name=\""
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "\" />"
             + EOL);
   }
   xmlDump.append("        <inputSet>" + EOL);
   for (Map.Entry<String, String> entry : subProcessNode.getInMappings().entrySet()) {
     xmlDump.append(
         "          <dataInputRefs>"
             + XmlBPMNProcessDumper.getUniqueNodeId(subProcessNode)
             + "_"
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "Input</dataInputRefs>"
             + EOL);
   }
   xmlDump.append("        </inputSet>" + EOL);
   xmlDump.append("        <outputSet>" + EOL);
   for (Map.Entry<String, String> entry : subProcessNode.getOutMappings().entrySet()) {
     xmlDump.append(
         "          <dataOutputRefs>"
             + XmlBPMNProcessDumper.getUniqueNodeId(subProcessNode)
             + "_"
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "Output</dataOutputRefs>"
             + EOL);
   }
   xmlDump.append("        </outputSet>" + EOL);
   xmlDump.append("      </ioSpecification>" + EOL);
   for (Map.Entry<String, String> entry : subProcessNode.getInMappings().entrySet()) {
     xmlDump.append("      <dataInputAssociation>" + EOL);
     xmlDump.append(
         "        <sourceRef>"
             + XmlDumper.replaceIllegalChars(entry.getValue())
             + "</sourceRef>"
             + EOL
             + "        <targetRef>"
             + XmlBPMNProcessDumper.getUniqueNodeId(subProcessNode)
             + "_"
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "Input</targetRef>"
             + EOL);
     xmlDump.append("      </dataInputAssociation>" + EOL);
   }
   for (Map.Entry<String, String> entry : subProcessNode.getOutMappings().entrySet()) {
     xmlDump.append("      <dataOutputAssociation>" + EOL);
     xmlDump.append(
         "        <sourceRef>"
             + XmlBPMNProcessDumper.getUniqueNodeId(subProcessNode)
             + "_"
             + XmlDumper.replaceIllegalChars(entry.getKey())
             + "Output</sourceRef>"
             + EOL
             + "        <targetRef>"
             + entry.getValue()
             + "</targetRef>"
             + EOL);
     xmlDump.append("      </dataOutputAssociation>" + EOL);
   }
 }