Package org.jbpm.pvm.internal.job

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


  }

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

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


  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

  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

    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

  }

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

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

  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

  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

TOP

Related Classes of org.jbpm.pvm.internal.job.TimerImpl

Copyright © 2018 www.massapicom. 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.