Examples of halt()


Examples of org.drools.StatefulSession.halt()

          session.startProcess("org.drools.timer", params);
        assertEquals(0, myList.size());
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        assertEquals(1, ((InternalProcessRuntime) ((InternalWorkingMemory) session).getProcessRuntime()).getTimerManager().getTimers().size());
       
        session.halt();
       
        final StatefulSession session2 = getSerialisedStatefulSession( session );
        myList = (List<String>) session2.getGlobal( "myList" );
       
    new Thread(new Runnable() {
View Full Code Here

Examples of org.drools.StatefulSession.halt()

        } catch (InterruptedException e) {
            // do nothing
        }
        assertEquals(1, myList.size());
       
        session2.halt();
  }

  @SuppressWarnings("unchecked")
  public void testOnEntryTimerWorkItemExecuted() throws Exception {
    PackageBuilder builder = new PackageBuilder();
View Full Code Here

Examples of org.drools.StatefulSession.halt()

          session.startProcess("org.drools.timer");
        assertEquals(0, myList.size());
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        assertEquals(1, ((InternalProcessRuntime) ((InternalWorkingMemory) session).getProcessRuntime()).getTimerManager().getTimers().size());
       
        session.halt();
       
        final StatefulSession session2 = getSerialisedStatefulSession( session );
        myList = (List<String>) session2.getGlobal( "myList" );
       
    new Thread(new Runnable() {
View Full Code Here

Examples of org.drools.StatefulSession.halt()

        } catch (InterruptedException e) {
            // do nothing
        }
        assertEquals(1, myList.size());
       
        session2.halt();
  }

  public void testIncorrectOnEntryTimer() throws Exception {
    PackageBuilder builder = new PackageBuilder();
    Reader source = new StringReader(
View Full Code Here

Examples of org.drools.StatefulSession.halt()

        ProcessInstance processInstance = ( ProcessInstance )
          session.startProcess("org.drools.timer");
        assertEquals(0, myList.size());
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        assertEquals(1, ((InternalProcessRuntime) ((InternalWorkingMemory) session).getProcessRuntime()).getTimerManager().getTimers().size());
        session.halt();
       
        final StatefulSession session2 = getSerialisedStatefulSession( session );
        myList = (List<String>) session2.getGlobal( "myList" );
       
    new Thread(new Runnable() {
View Full Code Here

Examples of org.drools.StatefulSession.halt()

        } catch (InterruptedException e) {
            // do nothing
        }
        assertEquals(2, myList.size());
       
        session2.halt();
  }
 
  @SuppressWarnings("unchecked")
  public void testMultipleTimers() throws Exception {
    PackageBuilder builder = new PackageBuilder();
View Full Code Here

Examples of org.drools.StatefulSession.halt()

        } catch (InterruptedException e) {
            // do nothing
        }
        assertEquals(1, myList.size());
        assertEquals("Executing timer2", myList.get(0));
        session2.halt();
       
        final StatefulSession session3 = getSerialisedStatefulSession( session2 );
        myList = (List<String>) session.getGlobal( "myList" );
       
    new Thread(new Runnable() {
View Full Code Here

Examples of org.drools.StatefulSession.halt()

        } catch (InterruptedException e) {
            // do nothing
        }
        assertEquals(2, myList.size());
       
        session3.halt();
  }
 
  @SuppressWarnings("unchecked")
  public void testOnEntryTimerCancelled() throws Exception {
    PackageBuilder builder = new PackageBuilder();
View Full Code Here

Examples of org.drools.StatefulSession.halt()

        ProcessInstance processInstance = ( ProcessInstance )
          session.startProcess("org.drools.timer");
        assertEquals(0, myList.size());
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        assertEquals(1, ((InternalProcessRuntime) ((InternalWorkingMemory) session).getProcessRuntime()).getTimerManager().getTimers().size());
        session.halt();
       
        final StatefulSession session2 = getSerialisedStatefulSession( session );
        myList = (List<String>) session2.getGlobal( "myList" );
       
    new Thread(new Runnable() {
View Full Code Here

Examples of org.drools.StatefulSession.halt()

   
        session2.insert(new Message());
        assertEquals(0, myList.size());
        assertEquals(0, ((InternalProcessRuntime) ((InternalWorkingMemory) session2).getProcessRuntime()).getTimerManager().getTimers().size());
       
        session2.halt();
  }
 
}
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.