Examples of fireAllRules()


Examples of org.drools.reteoo.ReteooWorkingMemory.fireAllRules()

    public BatchExecutionResults execute(Command command) {       
        ReteooWorkingMemory session = ( ReteooWorkingMemory ) newWorkingMemory();
        try {
            session.startBatchExecution();
            ((org.drools.process.command.Command)command).execute( session );
            session.fireAllRules( this.agendaFilter );
            BatchExecutionResults result = session.getBatchExecutionResult();
            return result;
        } finally {
            session.endBatchExecution();
        }
View Full Code Here

Examples of org.drools.reteoo.ReteooWorkingMemoryInterface.fireAllRules()

        str += "end  \n";        
       
        KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
       
        ReteooWorkingMemoryInterface wm = ((StatefulKnowledgeSessionImpl)kbase.newStatefulKnowledgeSession()).session;
        wm.fireAllRules();
       
       
        ObjectTypeNode otnInit = getObjectTypeNode(kbase, "InitialFactImpl" );
       
        LeftInputAdapterNode liaNode = ( LeftInputAdapterNode ) otnInit.getSinkPropagator().getSinks()[0];
View Full Code Here

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

       
        WorkflowProcessInstanceUpgrader.upgradeProcessInstance(
            session, processInstance.getId(), "org.test.ruleflow2", new HashMap<String, Long>());
        assertEquals("org.test.ruleflow2", processInstance.getProcessId());
       
        session.fireAllRules();
       
        assertEquals(2, list.size());
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
    }
View Full Code Here

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

       
        WorkflowProcessInstanceUpgrader.upgradeProcessInstance(
            session, processInstance.getId(), "org.test.ruleflow2", mapping);
        assertEquals("org.test.ruleflow2", processInstance.getProcessId());
       
        session.fireAllRules();
       
        assertEquals(2, list.size());
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
    }
   
View Full Code Here

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

       
        WorkflowProcessInstanceUpgrader.upgradeProcessInstance(
            session, processInstance.getId(), "org.test.ruleflow2", mapping);
        assertEquals("org.test.ruleflow2", processInstance.getProcessId());
       
        session.fireAllRules();
       
        assertEquals(2, list.size());
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
    }
   
View Full Code Here

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

        kbuilder.add( ResourceFactory.newClassPathResource("ruleflow40.rfm", ExecutionFlowControlTest.class), ResourceType.DRF);
        KnowledgeBase kbase = kbuilder.newKnowledgeBase();
        final StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
        final List list = new ArrayList();
        ksession.setGlobal("list", list);
        ksession.fireAllRules();
        assertEquals(0, list.size());
        final ProcessInstance processInstance = ksession.startProcess("0");
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        ksession.fireAllRules();
        assertEquals( 4,
View Full Code Here

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

        ksession.setGlobal("list", list);
        ksession.fireAllRules();
        assertEquals(0, list.size());
        final ProcessInstance processInstance = ksession.startProcess("0");
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        ksession.fireAllRules();
        assertEquals( 4,
                      list.size() );
        assertEquals( "Rule1",
                      list.get( 0 ) );
        assertEquals( "Rule3",
View Full Code Here

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

    List<String> list = new ArrayList<String>();
    ksession.setGlobal("list", list);
    ProcessInstance processInstance = ksession.startProcess("RuleTask");
    assertTrue(processInstance.getState() == ProcessInstance.STATE_ACTIVE);
    restoreSession(ksession, true);
    ksession.fireAllRules();
    assertTrue(list.size() == 1);
        assertProcessInstanceCompleted(processInstance.getId(), ksession);
  }

    public void testDataObject() throws Exception {
View Full Code Here

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

    assertProcessInstanceCompleted(processInstance.getId(), ksession);
    Thread.sleep(800);
    ksession = restoreSession(ksession, true);
    ksession.getWorkItemManager().registerWorkItemHandler("Email1", new SystemOutWorkItemHandler());
    ksession.getWorkItemManager().registerWorkItemHandler("Email2", new SystemOutWorkItemHandler());
        ksession.fireAllRules();
        ksession = restoreSession(ksession, true);
    ksession.getWorkItemManager().registerWorkItemHandler("Email1", new SystemOutWorkItemHandler());
    ksession.getWorkItemManager().registerWorkItemHandler("Email2", new SystemOutWorkItemHandler());
        // Timer
    processInstance = ksession.startProcess("com.sample.test");
View Full Code Here

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

    assertTrue(processInstance.getState() == ProcessInstance.STATE_ACTIVE);
    Thread.sleep(800);
    ksession = restoreSession(ksession, true);
    ksession.getWorkItemManager().registerWorkItemHandler("Email1", new SystemOutWorkItemHandler());
    ksession.getWorkItemManager().registerWorkItemHandler("Email2", new SystemOutWorkItemHandler());
        ksession.fireAllRules();
    assertProcessInstanceCompleted(processInstance.getId(), ksession);
  }
 
  public void testEventBasedSplit3() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-EventBasedSplit3.bpmn2");
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.