Examples of cancelTimer()


Examples of org.drools.process.instance.timer.TimerManager.cancelTimer()

  private void cancelTimers() {
    // deactivate still active timers
    if (timerInstances != null) {
      TimerManager timerManager = ((ProcessInstance) getProcessInstance()).getWorkingMemory().getTimerManager();
      for (Long id: timerInstances) {
        timerManager.cancelTimer(id);
      }
    }
  }
 
}
View Full Code Here

Examples of org.drools.process.instance.timer.TimerManager.cancelTimer()

            // do nothing
        }
        // we can't know exactly how many times this will fire as timers are not precise, but should be atleast 4
        assertTrue( counter >= 4 );
       
        timerManager.cancelTimer(timer.getId());
        int lastCount = counter;
        try {           
          Thread.sleep(1000);
        } catch (InterruptedException e) {
          // do nothing
View Full Code Here

Examples of org.jbpm.process.instance.timer.TimerManager.cancelTimer()

            // do nothing
        }
        // we can't know exactly how many times this will fire as timers are not precise, but should be atleast 4
        assertTrue( counter >= 4 );
       
        timerManager.cancelTimer(timer.getId());
        int lastCount = counter;
        try {           
          Thread.sleep(1000);
        } catch (InterruptedException e) {
          // do nothing
View Full Code Here

Examples of org.jbpm.process.instance.timer.TimerManager.cancelTimer()

    // deactivate still active timers
    if (timerInstances != null) {
      TimerManager timerManager = ((InternalProcessRuntime)
        getProcessInstance().getKnowledgeRuntime().getProcessRuntime()).getTimerManager();
      for (Long id: timerInstances) {
        timerManager.cancelTimer(id);
      }
    }
  }
 
}
View Full Code Here

Examples of org.jbpm.process.instance.timer.TimerManager.cancelTimer()

                WorkflowProcessInstance pi = ((WorkflowProcessInstance) processInstance);
               
                for (org.kie.api.runtime.process.NodeInstance nodeInstance : pi.getNodeInstances()) {
                    if (nodeInstance instanceof TimerNodeInstance){
                        if (((TimerNodeInstance)nodeInstance).getTimerInstance() != null) {
                            timerManager.cancelTimer(((TimerNodeInstance)nodeInstance).getTimerInstance().getId());
                        }
                    } else if (nodeInstance instanceof StateBasedNodeInstance) {
                        List<Long> timerIds = ((StateBasedNodeInstance) nodeInstance).getTimerInstances();
                        if (timerIds != null) {
                            for (Long id: timerIds) {
View Full Code Here

Examples of org.jbpm.process.instance.timer.TimerManager.cancelTimer()

                        }
                    } else if (nodeInstance instanceof StateBasedNodeInstance) {
                        List<Long> timerIds = ((StateBasedNodeInstance) nodeInstance).getTimerInstances();
                        if (timerIds != null) {
                            for (Long id: timerIds) {
                                timerManager.cancelTimer(id);
                            }
                        }
                    }
                }
               
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.