Package org.drools.core.impl

Examples of org.drools.core.impl.InternalKnowledgeBase.newStatefulKnowledgeSession()


    public void testRemoval() {
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
        conf.setOption( RuleEngineOption.RETEOO );

        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase(conf);
        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        InternalAgenda agenda = ( InternalAgenda ) ksession.getAgenda();
        AgendaItem item1 = new RuleTerminalNodeLeftTuple();
        AgendaItem item2 = new RuleTerminalNodeLeftTuple();
        AgendaItem item3 = new RuleTerminalNodeLeftTuple();
View Full Code Here


    public void testUnblockAll() {
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
        conf.setOption( RuleEngineOption.RETEOO );

        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase(conf);
        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        InternalAgenda agenda = ( InternalAgenda ) ksession.getAgenda();
        AgendaItem item1 = new RuleTerminalNodeLeftTuple();
        AgendaItem item2 = new RuleTerminalNodeLeftTuple();
        AgendaItem item3 = new RuleTerminalNodeLeftTuple();
View Full Code Here

    public void testKnowledgeHelperUpdate() {
        RuleBaseConfiguration conf = new RuleBaseConfiguration();
        conf.setOption( RuleEngineOption.RETEOO );

        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase(conf);
        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        InternalAgenda agenda = ( InternalAgenda ) ksession.getAgenda();
        AgendaItem item1 = new RuleTerminalNodeLeftTuple();
        AgendaItem item2 = new RuleTerminalNodeLeftTuple();
        AgendaItem item3 = new RuleTerminalNodeLeftTuple();
View Full Code Here

    @Test
    public void testMemory() {
        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();

        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final ObjectTypeNode objectTypeNode = new ObjectTypeNode(idGenerator.getNextId(),
                                                                 this.entryPoint,
                                                                 new ClassObjectType(String.class),
                                                                 buildContext);
View Full Code Here

                                                                                PropagationContext.INSERTION,
                                                                                null,
                                                                                null,
                                                                                null);

        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final Rete source = new Rete(kBase);

        final ObjectTypeNode objectTypeNode = new ObjectTypeNode(idGenerator.getNextId(),
                                                                 this.entryPoint,
View Full Code Here

                                                                                null,
                                                                                null);

        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();
        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();

        final Rete source = kBase.getRete();

        final EntryPointNode entryPoint = new EntryPointNode(0,
                                                             source,
View Full Code Here

    @Test
    public void testNoLoopScheduledActivation() throws Exception {
        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
        IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();

        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();
        final Agenda agenda = ksession.getAgenda();

        final RuleImpl rule = new RuleImpl("test-rule");
        final List data = new ArrayList();
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.