Package org.drools.bpmn2

Examples of org.drools.bpmn2.SimpleBPMNProcessTest$TestWorkItemHandler


        List<Interface> interfaces = (List<Interface>)
            ((ProcessBuildData) parser.getData()).getMetaData("Interfaces");
        if (interfaces == null) {
            throw new IllegalArgumentException("No interfaces found");
        }
        Operation operation = null;
        for (Interface i: interfaces) {
            operation = i.getOperation(operationRef);
            if (operation != null) {
                break;
            }
        }
        if (operation == null) {
            throw new IllegalArgumentException("Could not find operation " + operationRef);
        }
        workItemNode.getWork().setParameter("Interface", operation.getInterface().getName());
        workItemNode.getWork().setParameter("Operation", operation.getName());
        workItemNode.getWork().setParameter("ParameterType", operation.getMessage().getType());
    }
View Full Code Here


    String id = attrs.getValue("id");
    String name = attrs.getValue("name");
   
    Interface i = (Interface) parser.getParent();
        Operation operation = i.addOperation(id, name);
    return operation;
  }
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(structureRef);
        if (itemDefinition == null) {
            throw new IllegalArgumentException("Could not find itemDefinition " + structureRef);
        }
       
        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

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

              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

    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

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

              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

TOP

Related Classes of org.drools.bpmn2.SimpleBPMNProcessTest$TestWorkItemHandler

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.