Package org.kie.runtime

Examples of org.kie.runtime.KieSession.fireAllRules()


            }
        } );

        txTemplate.execute( new TransactionCallback() {
            public Object doInTransaction(TransactionStatus status) {
                ksession2.fireAllRules();
                return null;
            }
        } );

        assertEquals( 6,
View Full Code Here


            }
        } );

        txTemplate.execute( new TransactionCallback() {
            public Object doInTransaction(TransactionStatus status) {
                ksession2.fireAllRules();
                return null;
            }
        } );

        assertEquals( 6,
View Full Code Here

        KieSession kSession = kContainer.newKieSession( "ksession1" );
        kSession.setGlobal( "out", out );
       
        Object msg1 = createMessage( kContainer,"Dave", "Hello, HAL. Do you read me, HAL?" );       
        kSession.insert( msg1 );
        kSession.fireAllRules();
    }
   
    public static void main( String[] args ) {
        new NamedKieSessionFromFileExample().go( System.out );
    }
View Full Code Here

        KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
        int fired;
        if ( max != -1 && agendaFilter != null ) {
            fired = ((StatefulKnowledgeSessionImpl) ksession).session.fireAllRules( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ), max );
        } else if ( max != -1 ) {
            fired = ksession.fireAllRules( max );
        } else if ( agendaFilter != null ) {
            fired = ((StatefulKnowledgeSessionImpl) ksession).session.fireAllRules( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ) );
        } else {
            fired = ksession.fireAllRules();
        }
View Full Code Here

        } else if ( max != -1 ) {
            fired = ksession.fireAllRules( max );
        } else if ( agendaFilter != null ) {
            fired = ((StatefulKnowledgeSessionImpl) ksession).session.fireAllRules( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ) );
        } else {
            fired = ksession.fireAllRules();
        }

        if ( this.outIdentifier != null ) {
            ExecutionResultImpl results = ((StatefulKnowledgeSessionImpl)ksession).session.getExecutionResult();
            results.getResults().put(this.outIdentifier, fired);
View Full Code Here

        KieSession kSession = kContainer.newKieSession( "ksession2" );
        kSession.setGlobal( "out", out );
       
        Object msg1 = createMessage(kContainer, "Dave", "Hello, HAL. Do you read me, HAL?");       
        kSession.insert( msg1 );
        kSession.fireAllRules();             

        Object msg2 = createMessage(kContainer, "Dave", "Open the pod bay doors, HAL.");       
        kSession.insert( msg2 );
        kSession.fireAllRules()
    }
View Full Code Here

        kSession.insert( msg1 );
        kSession.fireAllRules();             

        Object msg2 = createMessage(kContainer, "Dave", "Open the pod bay doors, HAL.");       
        kSession.insert( msg2 );
        kSession.fireAllRules()
    }
   
    public static void main( String[] args ) {
        new KieModuleFromMultipleFilesExample().go( System.out );
    }
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.