Examples of fireUntilHalt()


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

        final ReteooWorkingMemoryInterface session = ((StatefulKnowledgeSessionImpl)ksession).session;
       
        new Thread(new Runnable() {
            public void run() {
                if ( agendaFilter != null ) {
                    session.fireUntilHalt( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ) );
                } else {
                    session.fireUntilHalt();
                }
            }
        }).start();
View Full Code Here

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

        new Thread(new Runnable() {
            public void run() {
                if ( agendaFilter != null ) {
                    session.fireUntilHalt( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ) );
                } else {
                    session.fireUntilHalt();
                }
            }
        }).start();

        return null;
View Full Code Here

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

        final ReteooWorkingMemoryInterface session = ((StatefulKnowledgeSessionImpl)ksession).session;
       
        new Thread(new Runnable() {
            public void run() {
                if ( agendaFilter != null ) {
                    session.fireUntilHalt( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ) );
                } else {
                    session.fireUntilHalt();
                }
            }
        }).start();
View Full Code Here

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

        new Thread(new Runnable() {
            public void run() {
                if ( agendaFilter != null ) {
                    session.fireUntilHalt( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ) );
                } else {
                    session.fireUntilHalt();
                }
            }
        }).start();

        return null;
View Full Code Here

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

        final StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
        List<String> list = new ArrayList<String>();
        ksession.setGlobal("list", list);
        new Thread(new Runnable() {
      public void run() {
        ksession.fireUntilHalt();
      }
        }).start();
        // start process
        WorkflowProcessInstance processInstance = (WorkflowProcessInstance)
            ksession.startProcess("org.drools.state");
View Full Code Here

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

        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        final StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

        Runnable fireUntilHalt = new Runnable() {
            public void run() {
                ksession.fireUntilHalt();
            }
        };
        Runnable fireAllRules = new Runnable() {
            public void run() {
                ksession.fireAllRules();
View Full Code Here

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

        ksession.insert( new Cheese( "cheddar" ) );
        ksession.fireAllRules();

        Runnable fireUntilHalt = new Runnable() {
            public void run() {
                ksession.fireUntilHalt();
            }
        };

        Thread t1 = new Thread( fireUntilHalt );
        t1.start();
View Full Code Here

Examples of org.kie.api.runtime.KieSession.fireUntilHalt()

    public void testHaltWithTimer() throws Exception {
        KnowledgeBase kbase = loadKnowledgeBase("test_Halt_With_Timer.drl");
        final KieSession ksession = createKnowledgeSession(kbase);

        new Thread( new Runnable(){
            public void run(){ ksession.fireUntilHalt(); }
            } ).start();
        Thread.sleep( 1000 );
        FactHandle handle = (FactHandle) ksession.insert( "halt" );
        Thread.sleep( 2000 );
View Full Code Here

Examples of org.kie.api.runtime.KieSession.fireUntilHalt()

        List list = new ArrayList();
        ksession.setGlobal( "list", list );

        new Thread( new Runnable(){
            public void run(){ ksession.fireUntilHalt(); }
        } ).start();
        Thread.sleep( 250 );

        assertEquals( java.util.Arrays.asList( 0, 0, 0 ), list );
View Full Code Here

Examples of org.kie.api.runtime.KieSession.fireUntilHalt()

        ksession.insert( "trigger" );
        Thread.sleep( 300 );
        assertEquals( java.util.Arrays.asList( 0, 0, 0 ), list );

        new Thread( new Runnable(){
            public void run(){ ksession.fireUntilHalt(); }
        } ).start();
        Thread.sleep( 200 );

        assertEquals( java.util.Arrays.asList( 0, 0, 0, 5, 0, -5, 0, 0 ), list );
    }
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.