Examples of KnowledgeSessionConfiguration


Examples of org.drools.runtime.KnowledgeSessionConfiguration

       
        addCommand( new NewKnowledgeBuilderCommand( null, KnowledgeBase.class.getName() ) );
        addCommand( new SetVariableCommandFromLastReturn( KnowledgeBuilder.class.getName() ));
       
       
        KnowledgeSessionConfiguration ksessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksessionConf.setOption( ClockTypeOption.get( "pseudo" ) );
        addCommand( new NewStatefulKnowledgeSessionCommand( ksessionConf ) );            
        addCommand( new SetVariableCommandFromLastReturn( StatefulKnowledgeSession.class.getName() ));       

        return new FluentCompactStatefulKnowledgeSessionImpl(this);
    }
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

    public FluentStandardStep end() {
        return step;
    }

    public FluentStandardStatefulKnowledgeSession newStatefulKnowledgeSession() {
        KnowledgeSessionConfiguration ksessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksessionConf.setOption( ClockTypeOption.get( "pseudo" ) );
        getSim().addCommand( new NewStatefulKnowledgeSessionCommand( ksessionConf ) );            
        getSim().addCommand( new SetVariableCommandFromLastReturn( ContextManager.ROOT, StatefulKnowledgeSession.class.getName() ));       

        return new FluentStandardStatefulKnowledgeSessionImpl(getSim(), step);
    }
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

        KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
        config.setOption( EventProcessingOption.STREAM );
        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        ksession.insert( new A() );
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

        config.setOption( EventProcessingOption.STREAM );
        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

        config.setOption( EventProcessingOption.STREAM );
        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

        config.setOption( EventProcessingOption.STREAM );
        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

        config.setOption( EventProcessingOption.STREAM );
        KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
        knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
       
        List list = new ArrayList();
        ksession.setGlobal( "list", list );
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        MarshallerFactory.newMarshaller( kbase ).marshall( out,
                                                           ksession );
       
        KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();       
        ((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
        ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
       
       
        ksession = MarshallerFactory.newMarshaller( kbase ).unmarshall( new ByteArrayInputStream( out.toByteArray() ), ksconf, null );
        ((StatefulKnowledgeSessionImpl)ksession).session.setGlobalResolver( (GlobalResolver) globals )
       
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

                     kbuilder.hasErrors() );

        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        KnowledgeSessionConfiguration conf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        conf.setOption( ClockTypeOption.get( "pseudo" ) );
        StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession( conf,
                                                                              null );

        SessionPseudoClock clock = session.getSessionClock();
View Full Code Here

Examples of org.drools.runtime.KnowledgeSessionConfiguration

        // create the kbase
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages( pkgs );

        // create the session
        KnowledgeSessionConfiguration conf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
        StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession( conf,
                                                                              null );

        final List<StockTick> results = new ArrayList<StockTick>();
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.