Package org.kie.runtime

Examples of org.kie.runtime.KieContainer.newKieSession()


    public KieSession execute(Context context) {
        // use the new API to retrieve the session by ID
        KieServices kieServices = KieServices.Factory.get();
        KieContainer kieContainer = kieServices.newKieContainer( releaseId );
        return sessionId != null ? kieContainer.newKieSession( sessionId ) : kieContainer.newKieSession();
    }

}
View Full Code Here


    public KieSession execute(Context context) {
        // use the new API to retrieve the session by ID
        KieServices kieServices = KieServices.Factory.get();
        KieContainer kieContainer = kieServices.newKieContainer( releaseId );
        return sessionId != null ? kieContainer.newKieSession( sessionId ) : kieContainer.newKieSession();
    }

}
View Full Code Here

        Resource ex2Res = ks.getResources().newFileSystemResource( getFile("kiebase-inclusion") ) ;
       
        KieModule kModule = kr.addKieModule(ex1Res,  ex2Res);
        KieContainer kContainer = ks.newKieContainer( kModule.getReleaseId() );

        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();             
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.