Examples of SchedulerService


Examples of org.drools.time.SchedulerService

    public void configureService(Grid grid) {
        CoreServicesLookupImpl coreServices = (CoreServicesLookupImpl) grid.get( CoreServicesLookup.class );

        GridServiceDescriptionImpl gsd = (GridServiceDescriptionImpl) coreServices.lookup( SchedulerService.class );

        SchedulerService scheduler = new SchedulerClient( grid,
                                                          gsd);
        ((GridImpl) grid).addService( SchedulerService.class,
                                      scheduler );

    }
View Full Code Here

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

Examples of org.jbpm.scheduler.SchedulerService

  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

Examples of org.jbpm.scheduler.SchedulerService

    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

Examples of org.jbpm.scheduler.SchedulerService

      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

Examples of org.jbpm.scheduler.SchedulerService

        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

Examples of org.jbpm.scheduler.SchedulerService

    }
  }

  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

Examples of org.jbpm.scheduler.SchedulerService

    }
  }

  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

Examples of org.jbpm.scheduler.SchedulerService

    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

Examples of org.jbpm.scheduler.SchedulerService

      }

      // 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
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.