Package org.drools.bpmn2.xml

Examples of org.drools.bpmn2.xml.BPMNDISemanticModule


    }
   
    public void testMessageEnd() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-MessageEndEvent.xml");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        ksession.getWorkItemManager().registerWorkItemHandler("Send Task", new SendTaskHandler());
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("x", "MyValue");
        ProcessInstance processInstance = ksession.startProcess("MessageEndEvent", params);
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
    }
View Full Code Here


    }
   
    public void testMessageIntermediateThrow() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-IntermediateThrowEventMessage.xml");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        ksession.getWorkItemManager().registerWorkItemHandler("Send Task", new SendTaskHandler());
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("x", "MyValue");
        ProcessInstance processInstance = ksession.startProcess("MessageIntermediateEvent", params);
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
    }
View Full Code Here

//    }

    public void testServiceTask() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-ServiceProcess.xml");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        ksession.getWorkItemManager().registerWorkItemHandler("Service Task", new ServiceTaskHandler());
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("s", "john");
        WorkflowProcessInstance processInstance = (WorkflowProcessInstance)
            ksession.startProcess("ServiceProcess", params);
    assertProcessInstanceCompleted(processInstance.getId(), ksession);
View Full Code Here

    public void testAdHocSubProcess() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
        processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-AdHocSubProcess.xml"));
View Full Code Here

    public void testAdHocSubProcessAutoComplete() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
        processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-AdHocSubProcessAutoComplete.xml"));
View Full Code Here

  private KnowledgeBase createKnowledgeBase(String process) throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
        processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/" + process));
View Full Code Here

    XMLUnit.setIgnoreComments(true);
  }
 
  public void testXML() throws IOException, SAXException {
    SemanticModules modules = new SemanticModules();
    modules.addSemanticModule(new BPMNSemanticModule());
        XmlProcessReader processReader = new XmlProcessReader(modules);
        for (String processName: processes) {
      String original = slurp(BPMN2XMLTest.class.getResourceAsStream("/" + processName));
      RuleFlowProcess p = (RuleFlowProcess)
          processReader.read(BPMN2XMLTest.class.getResourceAsStream("/" + processName));
View Full Code Here

    }

    public void testAdHocSubProcess() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
View Full Code Here

    }

    public void testAdHocSubProcessAutoComplete() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
View Full Code Here

//    }

  private KnowledgeBase createKnowledgeBase(String process) throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
View Full Code Here

TOP

Related Classes of org.drools.bpmn2.xml.BPMNDISemanticModule

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.