Examples of TimerImpl


Examples of org.jbpm.pvm.internal.job.TimerImpl

  public TimerImpl createTimer(TimerDefinitionImpl timerDefinition) {
    if (log.isDebugEnabled()) {
      log.debug("creating timer on "+this.toString());
    }

    TimerImpl timer = newTimer();
    timer.setExecution(getTimerExecution());
   
    if (timerDefinition!=null) {
      timer.setEventName(timerDefinition.getEventName());
      timer.setSignalName(timerDefinition.getSignalName());
      timer.setDueDate(timerDefinition.getDueDate());
      timer.setDueDateDescription(timerDefinition.getDueDateDescription());
      Boolean isExclusive = timerDefinition.isExclusive();
      if (isExclusive!=null) {
        timer.setExclusive(isExclusive);
      }
      Integer retries = timerDefinition.getRetries();
      if (retries!=null) {
        timer.setRetries(retries);
     }
      timer.setRepeat(timerDefinition.getRepeat());
    }
   
    return timer;
  }
View Full Code Here

Examples of org.jbpm.pvm.internal.job.TimerImpl

  protected void initializeTimers(ScopeElementImpl scope) {
    // initialize the timers
    Set<TimerDefinitionImpl> timerDefinitions = scope.getTimerDefinitions();
    if (!timerDefinitions.isEmpty()) {
      for (TimerDefinitionImpl timerDefinition: timerDefinitions) {
        TimerImpl timer = createTimer(timerDefinition);
        timer.schedule();
      }
    }
  }
View Full Code Here

Examples of org.jbpm.pvm.internal.job.TimerImpl

    this.timerDbid = timerDbid;
  }

  public Date execute(Environment environment) throws Exception {
    DbSession dbSession = environment.get(DbSession.class);
    TimerImpl timerImpl = dbSession.get(TimerImpl.class, timerDbid);
    if (timerImpl == null) {
      log.debug("timer not found: " + timerDbid);
      return null; // i.e. delete this timer
    }
    return timerImpl.execute(environment) ? null : timerImpl.getDueDate();
  }
View Full Code Here

Examples of org.jbpm.pvm.internal.job.TimerImpl

  }

  // timers ///////////////////////////////////////////////////////////////////

  protected TimerImpl newTimer() {
    return new TimerImpl();
  }
View Full Code Here

Examples of org.jbpm.pvm.internal.job.TimerImpl

  public TimerImpl createTimer(TimerDefinitionImpl timerDefinition) {
    if (log.isDebugEnabled()) {
      log.debug("creating timer on "+this.toString());
    }

    TimerImpl timer = newTimer();
    timer.setExecution(getTimerExecution());
   
    if (timerDefinition!=null) {
      timer.setEventName(timerDefinition.getEventName());
      timer.setSignalName(timerDefinition.getSignalName());
      timer.setDuedate(timerDefinition.getDueDate());
      timer.setDueDateDescription(timerDefinition.getDueDateDescription());
      Boolean isExclusive = timerDefinition.isExclusive();
      if (isExclusive!=null) {
        timer.setExclusive(isExclusive);
      }
      Integer retries = timerDefinition.getRetries();
      if (retries!=null) {
        timer.setRetries(retries);
     }
      timer.setRepeat(timerDefinition.getRepeat());
    }
   
    return timer;
  }
View Full Code Here

Examples of org.jbpm.pvm.internal.job.TimerImpl

  protected void initializeTimers(ScopeElementImpl scope) {
    // initialize the timers
    Set<TimerDefinitionImpl> timerDefinitions = scope.getTimerDefinitions();
    if (!timerDefinitions.isEmpty()) {
      for (TimerDefinitionImpl timerDefinition: timerDefinitions) {
        TimerImpl timer = createTimer(timerDefinition);
        timer.schedule();
      }
    }
  }
View Full Code Here

Examples of org.openhab.model.script.internal.actions.TimerImpl

   */
 
  private static Timer makeTimer(AbstractInstant instant, String closure, JobDataMap dataMap) {
    JobKey jobKey = new JobKey(instant.toString() + ": " + closure.toString());
        Trigger trigger = newTrigger().startAt(instant.toDate()).build();
    Timer timer = new TimerImpl(jobKey, trigger.getKey(), instant);
    dataMap.put("timer", timer);
    try {
          JobDetail job = newJob(TimerExecutionJob.class)
              .withIdentity(jobKey)
              .usingJobData(dataMap)
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.