protected void handleNode(final Node node, final Element element, final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException { super.handleNode(node, element, uri, localName, parser); HumanTaskNode humanTaskNode = (HumanTaskNode) node; Work work = humanTaskNode.getWork(); work.setName("Human Task"); String performerRef = element.getAttribute("performerRef"); if (performerRef != null) { humanTaskNode.getWork().setParameter("ActorId", performerRef); } Map<String, String> inputs = new HashMap<>(); Map<String, String> outputs = new HashMap<>(); Map<String, String> inputTypes = new HashMap<>(); Map<String, String> outputTypes = new HashMap<>(); loadDataInputsAndOutputs(element, inputs, outputs, inputTypes, outputTypes, parser); humanTaskNode.setMetaData("DataInputs", inputTypes); humanTaskNode.setMetaData("DataOutputs", outputTypes); humanTaskNode.getWork().setParameter("NodeName", humanTaskNode.getName()); humanTaskNode.getWork().setParameter("TaskName", humanTaskNode.getName().replaceAll("\\s", "")); for (Entry<String, String> entry : inputs.entrySet()) { humanTaskNode.addInAssociation(new DataAssociation(entry.getValue(), entry.getKey(), Collections.emptyList(), null)); } for (Entry<String, String> entry : outputs.entrySet()) { humanTaskNode.addOutAssociation(new DataAssociation(entry.getKey(), entry.getValue(), Collections.emptyList(), null)); } }
protected void handleNode(final Node node, final Element element, final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException { super.handleNode(node, element, uri, localName, parser); HumanTaskNode humanTaskNode = (HumanTaskNode) node; Work work = humanTaskNode.getWork(); work.setName("Human Task"); String performerRef = element.getAttribute("performerRef"); if (performerRef != null) { humanTaskNode.getWork().setParameter("ActorId", performerRef); } Map<String, String> inputs = new HashMap<>(); Map<String, String> outputs = new HashMap<>(); Map<String, String> inputTypes = new HashMap<>(); Map<String, String> outputTypes = new HashMap<>(); loadDataInputsAndOutputs(element, inputs, outputs, inputTypes, outputTypes, parser); humanTaskNode.setMetaData("DataInputs", inputTypes); humanTaskNode.setMetaData("DataOutputs", outputTypes); humanTaskNode.getWork().setParameter("NodeName", humanTaskNode.getName()); humanTaskNode.getWork().setParameter("TaskName", humanTaskNode.getName().replaceAll("\\s", "")); for (Entry<String, String> entry : inputs.entrySet()) { humanTaskNode.addInAssociation(new DataAssociation(entry.getValue(), entry.getKey(), Collections.emptyList(), null)); } for (Entry<String, String> entry : outputs.entrySet()) { humanTaskNode.addOutAssociation(new DataAssociation(entry.getKey(), entry.getValue(), Collections.emptyList(), null)); } }