Package org.drools.runtime

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


        Object event = eventType.newInstance();
        eventType.set(event, "name", "myName");
        ksession.insert( event );

        ksession.fireUntilHalt();
    }
}
View Full Code Here

        CompletionService<Boolean> ecs = new ExecutorCompletionService<Boolean>(executor);
        ecs.submit(new Callable<Boolean>() {
            public Boolean call() throws Exception {
                try {
                    ksession.fireUntilHalt();
                    return true;
                } catch (Exception e) {
                    errors.add( e );
                    e.printStackTrace();
                    return false;
View Full Code Here

        final StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();

        Thread t = new Thread() {
            public void run()
            { session.fireUntilHalt(); }

        };
        t.start();

        session.fireAllRules();
View Full Code Here

        WorkingMemoryEntryPoint ep01 = session.getWorkingMemoryEntryPoint("ep01");


        Thread t = new Thread() {
            public void run()
            { session.fireUntilHalt(); }

        };
        t.start();

        Thread.sleep( 1000 );
View Full Code Here

        ksession.fireAllRules();

        Thread t = new Thread() {
            @Override
            public void run() {
                ksession.fireUntilHalt();
            }
        };
        t.start();

        final int FACTS_PER_POLL = 1000;
View Full Code Here

    PseudoClockScheduler clock = (PseudoClockScheduler) ksession.<SessionClock> getSessionClock();

    Runnable fireUntilHaltRunnable = new Runnable() {
      public void run() {
        ksession.fireUntilHalt();
      }
    };
    Thread fireUntilHaltThread = new Thread(fireUntilHaltRunnable, "Engine's thread");
    fireUntilHaltThread.start();
   
View Full Code Here

        ArrayList list = new ArrayList();
        ks.setGlobal( "list", list );

        new Thread () {
            public void run () {
                ks.fireUntilHalt();
            }
        }.start ();

        for ( int j = 0; j < N; j++ ) {
            ks.getWorkingMemoryEntryPoint( "x" ).insert( new Integer( j ) );
View Full Code Here

        WorkingMemoryEntryPoint ep01 = session.getWorkingMemoryEntryPoint("ep01");


        new Thread () {
            public void run () {
                session.fireUntilHalt();
            }
        }.start ();

        int eventLimit = 5000;
View Full Code Here

        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

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.