Package org.jbpm.scheduler

Examples of org.jbpm.scheduler.SchedulerService


    }
  }

  public void execute(ExecutionContext executionContext) throws Exception {
    Timer timer = createTimer(executionContext);
    SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER);
    schedulerService.createTimer(timer);
  }
View Full Code Here


  public CleanUpProcessJob(Token token) {
    super(token);
  }

  public boolean execute(JbpmContext jbpmContext) throws Exception {
    SchedulerService schedulerService = jbpmContext.getServices().getSchedulerService();
    if (schedulerService!=null) {
      schedulerService.deleteTimersByProcessInstance(processInstance);
    }
    return true;
  }
View Full Code Here

    transitionName = actionElement.attributeValue("transition");
  }

  public void execute(ExecutionContext executionContext) throws Exception {
    Timer timer = createTimer(executionContext);
    SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER);
    schedulerService.createTimer(timer);
  }
View Full Code Here

      jpdlReader.addWarning("no 'name' specified in CancelTimerAction '"+actionElement.asXML()+"'");
    }
  }

  public void execute(ExecutionContext executionContext) throws Exception {
    SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER);
    schedulerService.cancelTimersByName(timerName, executionContext.getToken());
  }
View Full Code Here

        superProcessToken.signal(superExecutionContext);
      }

      // make sure all the timers for this process instance are cancelled when the process end updates get saved in the database.
      // see also org.jbpm.db.SchedulerSession.saveTimers(ProcessInstance);
      SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER, false);
      if (schedulerService!=null) schedulerService.cancelTimersByProcessInstance(this);
    }
  }
View Full Code Here

    }
  }

  void suspendTimers() {
    // notify the scheduler service of this resuming
    SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER, false);
    if (schedulerService!=null) {
      schedulerService.suspendTimers(this);
    }
  }
View Full Code Here

    }
  }

  void resumeTimers() {
    // notify the scheduler service of this resuming
    SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER, false);
    if (schedulerService!=null) {
      schedulerService.resumeTimers(this);
    }
  }
View Full Code Here

    Services services = new Services(serviceFactories);
    assertSame(persistenceService, services.getPersistenceService());
  }
  public void testSchedulerService() {
    Map serviceFactories = new HashMap();
    SchedulerService schedulerService = new SchedulerService() {
      private static final long serialVersionUID = 1L;
      public void createTimer(Timer timer) {}
      public void cancelTimersByName(String timerName, Token token) {}
      public void cancelTimersByProcessInstance(ProcessInstance processInstance) {}
      public void suspendTimers(Token token) {}
View Full Code Here

      }

      // make sure all the timers for this process instance are cancelled when the process end updates get saved in the database.
      // TODO route this directly through the jobSession.  just like the suspend and resume.
      // NOTE Only timers should be deleted, messages-type of jobs should be kept.
      SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER, false);
      if (schedulerService!=null) schedulerService.deleteTimersByProcessInstance(this);
    }
  }
View Full Code Here

    transitionName = actionElement.attributeValue("transition");
  }

  public void execute(ExecutionContext executionContext) throws Exception {
    Timer timer = createTimer(executionContext);
    SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER);
    schedulerService.createTimer(timer);
  }
View Full Code Here

TOP

Related Classes of org.jbpm.scheduler.SchedulerService

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.