Package org.drools.bpmn2.legacy.beta1

Examples of org.drools.bpmn2.legacy.beta1.EndNodeHandler


            buildData.getMetaData("ItemDefinitions");
        if (itemDefinitions == null) {
            itemDefinitions = new HashMap<String, ItemDefinition>();
            buildData.setMetaData("ItemDefinitions", itemDefinitions);
        }
        ItemDefinition itemDefinition = new ItemDefinition(id);
        itemDefinition.setStructureRef(type);
        itemDefinitions.put(id, itemDefinition);
    return itemDefinition;
  }
View Full Code Here


      // retrieve type from item definition
      DataType dataType = new ObjectDataType();
      Map<String, ItemDefinition> itemDefinitions = (Map<String, ItemDefinition>)
              ((ProcessBuildData) parser.getData()).getMetaData("ItemDefinitions");
          if (itemDefinitions != null) {
            ItemDefinition itemDefinition = itemDefinitions.get(itemSubjectRef);
            if (itemDefinition != null) {
              dataType = new ObjectDataType(itemDefinition.getStructureRef());
            }
          }
      variable.setType(dataType);
      variables.add(variable);
      return variable;
View Full Code Here

            ((RuleFlowProcess) process).getMetaData(LaneHandler.LANES);         
        if (lanes == null) {
            lanes = new ArrayList<Lane>();
            ((RuleFlowProcess) process).setMetaData(LaneHandler.LANES, lanes);
        }
        Lane lane = new Lane(id);
        lane.setName(name);
        lanes.add(lane);
    return lane;
  }
View Full Code Here

  }

  public Object end(final String uri, final String localName,
                final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
        Lane lane = (Lane) parser.getCurrent();
       
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
            String nodeName = xmlNode.getNodeName();
            if ("flowElementRef".equals(nodeName)) {
                String flowElementRef = xmlNode.getTextContent();
                lane.addFlowElement(flowElementRef);
            }
            xmlNode = xmlNode.getNextSibling();
        }
        return lane;
    }
View Full Code Here

            ((RuleFlowProcess) process).getMetaData(LaneHandler.LANES);         
        if (lanes == null) {
            lanes = new ArrayList<Lane>();
            ((RuleFlowProcess) process).setMetaData(LaneHandler.LANES, lanes);
        }
        Lane lane = new Lane(id);
        lane.setName(name);
        lanes.add(lane);
    return lane;
  }
View Full Code Here

  }

  public Object end(final String uri, final String localName,
                final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
        Lane lane = (Lane) parser.getCurrent();
       
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
            String nodeName = xmlNode.getNodeName();
            if ("flowNodeRef".equals(nodeName)) {
                String flowElementRef = xmlNode.getTextContent();
                lane.addFlowElement(flowElementRef);
            }
            xmlNode = xmlNode.getNextSibling();
        }
        return lane;
    }
View Full Code Here

            ((ProcessBuildData) parser.getData()).getMetaData("Messages");
        if (messages == null) {
            messages = new HashMap<String, Message>();
            buildData.setMetaData("Messages", messages);
        }
        Message message = new Message(id);
        message.setType(itemDefinition.getStructureRef());
        messages.put(id, message);
    return message;
  }
View Full Code Here

    Map<String, Message> messages = (Map<String, Message>)
            ((ProcessBuildData) parser.getData()).getMetaData("Messages");
        if (messages == null) {
            throw new IllegalArgumentException("No messages found");
        }
        Message message = messages.get(messageId);
        if (message == null) {
            throw new IllegalArgumentException("Could not find message " + messageId);
        }
        Operation operation = (Operation) parser.getParent();
        operation.setMessage(message);
View Full Code Here

        Map<String, Message> messages = (Map<String, Message>)
            ((ProcessBuildData) parser.getData()).getMetaData("Messages");
        if (messages == null) {
            throw new IllegalArgumentException("No messages found");
        }
        Message message = messages.get(messageRef);
        if (message == null) {
            throw new IllegalArgumentException("Could not find message " + messageRef);
        }
        workItemNode.getWork().setParameter("MessageType", message.getType());
    }
View Full Code Here

                Map<String, Message> messages = (Map<String, Message>)
                    ((ProcessBuildData) parser.getData()).getMetaData("Messages");
                if (messages == null) {
                    throw new IllegalArgumentException("No messages found");
                }
                Message message = messages.get(messageRef);
                if (message == null) {
                    throw new IllegalArgumentException("Could not find message " + messageRef);
                }
                String variable = (String) actionNode.getMetaData("MappingVariable");
                actionNode.setMetaData("MessageType", message.getType());
                actionNode.setAction(new DroolsConsequenceAction("java",
                    "org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();" + EOL +
                    "workItem.setName(\"Send Task\");" + EOL +
                    "workItem.setParameter(\"MessageType\", \"" + message.getType() + "\");" + EOL +
                    (variable == null ? "" : "workItem.setParameter(\"Message\", " + variable + ");" + EOL) +
                    "((org.drools.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);"));
            }
            xmlNode = xmlNode.getNextSibling();
        }
View Full Code Here

TOP

Related Classes of org.drools.bpmn2.legacy.beta1.EndNodeHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.