Package org.drools.runtime

Examples of org.drools.runtime.StatefulKnowledgeSession.startProcess()


public class StandaloneBPMNProcessTest extends TestCase {
 
    public void testMinimalProcess() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-MinimalProcess.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ProcessInstance processInstance = ksession.startProcess("Minimal");
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }

  public void testMinimalProcessWithGraphical() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-MinimalProcessWithGraphical.bpmn2");
View Full Code Here


  }

  public void testMinimalProcessWithGraphical() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-MinimalProcessWithGraphical.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ProcessInstance processInstance = ksession.startProcess("Minimal");
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }

  public void testMinimalProcessWithDIGraphical() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-MinimalProcessWithDIGraphical.bpmn2");
View Full Code Here

  }

  public void testMinimalProcessWithDIGraphical() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-MinimalProcessWithDIGraphical.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ProcessInstance processInstance = ksession.startProcess("Minimal");
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }

  public void testCompositeProcessWithDIGraphical() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-CompositeProcessWithDIGraphical.bpmn2");
View Full Code Here

  }

  public void testCompositeProcessWithDIGraphical() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-CompositeProcessWithDIGraphical.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ProcessInstance processInstance = ksession.startProcess("Composite");
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }

    public void testScriptTask() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-ScriptTask.bpmn2");
View Full Code Here

  }

    public void testScriptTask() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-ScriptTask.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ProcessInstance processInstance = ksession.startProcess("ScriptTask");
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }

    public void testDataObject() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-DataObject.bpmn2");
View Full Code Here

    public void testDataObject() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-DataObject.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("employee", "UserId-12345");
        ProcessInstance processInstance = ksession.startProcess("Evaluation", params);
        assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
    }

  public void testEvaluationProcess() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-EvaluationProcess.bpmn2");
View Full Code Here

    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());
    ksession.getWorkItemManager().registerWorkItemHandler("RegisterRequest", new SystemOutWorkItemHandler());
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("employee", "UserId-12345");
    ProcessInstance processInstance = ksession.startProcess("Evaluation", params);
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }

  public void testEvaluationProcess2() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-EvaluationProcess2.bpmn2");
View Full Code Here

    KnowledgeBase kbase = createKnowledgeBase("BPMN2-EvaluationProcess2.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("employee", "UserId-12345");
    ProcessInstance processInstance = ksession.startProcess("com.sample.evaluation", params);
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }

//  public void testEvaluationProcess3() throws Exception {
//    KnowledgeBase kbase = createKnowledgeBase("BPMN2-EvaluationProcess3.bpmn2");
View Full Code Here

    public void testUserTask() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-UserTask.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        TestWorkItemHandler workItemHandler = new TestWorkItemHandler();
        ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler);
        ProcessInstance processInstance = ksession.startProcess("UserTask");
        assertTrue(processInstance.getState() == ProcessInstance.STATE_ACTIVE);
        ksession = restoreSession(ksession, true);
        WorkItem workItem = workItemHandler.getWorkItem();
        assertNotNull(workItem);
        assertEquals("john", workItem.getParameter("ActorId"));
View Full Code Here

    public void testLane() throws Exception {
        KnowledgeBase kbase = createKnowledgeBase("BPMN2-Lane.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        TestWorkItemHandler workItemHandler = new TestWorkItemHandler();
        ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler);
        ProcessInstance processInstance = ksession.startProcess("UserTask");
        assertTrue(processInstance.getState() == ProcessInstance.STATE_ACTIVE);
        ksession = restoreSession(ksession, true);
        ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler);
        WorkItem workItem = workItemHandler.getWorkItem();
        assertNotNull(workItem);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.