Package org.jbpm.bpmn2.xml

Examples of org.jbpm.bpmn2.xml.BoundaryEventHandler


              String itemSubjectRef = ((Element) subNode).getAttribute("itemSubjectRef");
              DataType dataType = null;
              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());
              }
            }
            if (dataType == null) {
              dataType = new ObjectDataType("java.lang.Object");
            }
View Full Code Here


            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

    // when we start having several documents, with imports.
    String localItemSubjectRef = itemSubjectRef.substring(
        itemSubjectRef.indexOf(":") +1);
    DataType dataType = new ObjectDataType();
    if (itemDefinitions != null) {
      ItemDefinition itemDefinition = itemDefinitions.get(localItemSubjectRef);
      if (itemDefinition != null) {
        dataType = new ObjectDataType(itemDefinition.getStructureRef());
      }
    }
    store.setType(dataType);
   
    Definitions parent = (Definitions) parser.getParent();
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

    Map<String, ItemDefinition> itemDefinitions = (Map<String, ItemDefinition>)
            ((ProcessBuildData) parser.getData()).getMetaData("ItemDefinitions");
        if (itemDefinitions == null) {
            throw new IllegalArgumentException("No item definitions found");
        }
        ItemDefinition itemDefinition = itemDefinitions.get(itemRef);
        if (itemDefinition == null) {
            throw new IllegalArgumentException("Could not find itemDefinition " + itemRef);
        }
       
        ProcessBuildData buildData = (ProcessBuildData) parser.getData();
    Map<String, Message> messages = (Map<String, Message>)
            ((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

            ((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

                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

        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("MessageId", message.getId());
        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);
                }
                startNode.setMetaData("MessageType", message.getType());
                EventTrigger trigger = new EventTrigger();
                EventTypeFilter eventFilter = new EventTypeFilter();
                eventFilter.setType("Message-" + messageRef);
                trigger.addEventFilter(eventFilter);
                String mapping = (String) startNode.getMetaData("TriggerMapping");
View Full Code Here

TOP

Related Classes of org.jbpm.bpmn2.xml.BoundaryEventHandler

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.