Examples of StatefulKnowledgeSessionImpl


Examples of org.drools.impl.StatefulKnowledgeSessionImpl

    public WorkingMemory getWorkingMemory() {
        return this.workingMemory;
    }
   
    public KnowledgeRuntime getKnowledgeRuntime() {
        return new StatefulKnowledgeSessionImpl( (ReteooWorkingMemory) this.workingMemory );
     }
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

                                                                   initialFactHandle,
                                                                   0,
                                                                   config,
                                                                   agenda,
                                                                   environment );
        new StatefulKnowledgeSessionImpl( session );

        initialFactHandle.setEntryPoint( session.getEntryPoints().get( EntryPoint.DEFAULT.getEntryPointId() ) );
        return session;
    }
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

                                                                   false,
                                                                   propagationCounter,
                                                                   config,
                                                                   agenda,
                                                                   environment );
        new StatefulKnowledgeSessionImpl( session );

        initialFactHandle.setEntryPoint( session.getEntryPoints().get( EntryPoint.DEFAULT.getEntryPointId() ) );

        return readSession( session,
                            agenda,
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

        assertSame( kbase1.getRuleBase(),
                    ksession1.getRuleBase() );
        assertSame( kagent1,
                    ksession1.getKnowledgeAgent() );

        StatefulKnowledgeSessionImpl ksession2 = (StatefulKnowledgeSessionImpl) context.getBean( "ksession2" );
        assertSame( kbase1.getRuleBase(),
                    ksession2.getRuleBase() );

        StatelessKnowledgeSessionImpl ksession3 = (StatelessKnowledgeSessionImpl) context.getBean( "ksession3" );
        assertSame( kagent2,
                    ksession3.getKnowledgeAgent() );
        assertSame( kbase2.getRuleBase(),
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

        assertEquals( EventProcessingOption.CLOUD,
                      rconf.getEventProcessingMode() );
        assertEquals( AssertBehaviour.EQUALITY,
                      rconf.getAssertBehaviour() );

        StatefulKnowledgeSessionImpl ksession1 = (StatefulKnowledgeSessionImpl) context.getBean( "ksession1" );
        SessionConfiguration sconf = ksession1.session.getSessionConfiguration();
        assertTrue( sconf.isKeepReference() );
        assertEquals( ClockType.REALTIME_CLOCK,
                      sconf.getClockType() );
        Map<String, WorkItemHandler> wih = sconf.getWorkItemHandlers();
        assertEquals( 4,
                      wih.size() );
        assertTrue( wih.containsKey( "wih1" ) );
        assertTrue( wih.containsKey( "wih2" ) );
        assertTrue( wih.containsKey( "Human Task" ) );
        assertTrue( wih.containsKey( "MyWork" ) );
        assertNotSame( wih.get( "wih1" ),
                       wih.get( "wih2" ) );
        assertEquals( HumanTaskHandler.class,
                      wih.get( "wih1" ).getClass() );
        assertEquals( HumanTaskHandler.class,
                      wih.get( "wih2" ).getClass() );

        StatefulKnowledgeSessionImpl ksession2 = (StatefulKnowledgeSessionImpl) context.getBean( "ksession2" );
        sconf = ksession2.session.getSessionConfiguration();
        assertFalse( sconf.isKeepReference() );
        assertEquals( ClockType.PSEUDO_CLOCK,
                      sconf.getClockType() );
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

    public WorkingMemory getWorkingMemory() {
        return this.workingMemory;
    }

    public KnowledgeRuntime getKnowledgeRuntime() {
        return new StatefulKnowledgeSessionImpl( (ReteooWorkingMemory) this.workingMemory );
    }
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

      }
      variableScope.setVariable(variableName, value);
    }

  public KnowledgeRuntime getKnowledgeRuntime() {
    return new StatefulKnowledgeSessionImpl(
      (ReteooStatefulSession) getProcessInstance().getWorkingMemory() );
  }
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

   
    public byte[] bytes;
   
    public void writeExternal(ObjectOutput out) throws IOException {
        // all we do is create marshall to a byte[] and write to the stream
        StatefulKnowledgeSessionImpl ksession = new StatefulKnowledgeSessionImpl( this );
        Marshaller marshaller = MarshallerFactory.newMarshaller( ksession.getKnowledgeBase() );
       
        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        marshaller.marshall( stream, ksession );
        stream.close();
       
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

    public WorkingMemory getWorkingMemory() {
        return this.workingMemory;
    }
   
    public KnowledgeRuntime getKnowledgeRuntime() {       
        return new StatefulKnowledgeSessionImpl( (ReteooWorkingMemory) this.workingMemory );
     }
View Full Code Here

Examples of org.drools.impl.StatefulKnowledgeSessionImpl

                                                                 new Object[]{workerId} );
        }

        assertNotNull( retractedWorker );

        StatefulKnowledgeSessionImpl sessionImpl = (StatefulKnowledgeSessionImpl) ksession;

        ReteooWorkingMemory reteWorkingMemory = sessionImpl.session;
        AbstractWorkingMemory abstractWorkingMemory = (AbstractWorkingMemory) reteWorkingMemory;

        InternalRuleBase ruleBase = (InternalRuleBase) abstractWorkingMemory.getRuleBase();
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.