Package org.jbpm.client

Examples of org.jbpm.client.CommandService.execute()


      }
      CommandService commandService = environmentFactory.get(CommandService.class);
      if (commandService==null) {
        throw new PvmException("environment factory doesn't have a command service");
      }
      commandService.execute(this);
    }
    public Object execute(Environment environment) {
      // reload the execution
      DbSession dbSession = environment.get(DbSession.class);
      if (dbSession==null) {
View Full Code Here


    if (userId!=null) {
      environment.setUserId(userId);
    }
    try {
      CommandService commandService = environment.get(CommandService.class);
      commandService.execute(command);
    } finally {
      if (userId!=null) {
        environment.setUserId(null);
      }
    }
View Full Code Here

  }

  protected Collection<Long> acquireJobs() {
    CommandService commandService = jobExecutor.getCommandExecutor();
    Command acquireJobsCommand = jobExecutor.getAcquireJobsCommand();
    return (Collection<Long>) commandService.execute(acquireJobsCommand);
  }

  protected Date getNextDueDate() {
    CommandService commandService = jobExecutor.getCommandExecutor();
    Command getNextDueDate = jobExecutor.getNextDueDateCommand();
View Full Code Here

  }

  protected Date getNextDueDate() {
    CommandService commandService = jobExecutor.getCommandExecutor();
    Command getNextDueDate = jobExecutor.getNextDueDateCommand();
    return (Date) commandService.execute(getNextDueDate);
  }

  protected long getWaitPeriod() {
    long interval = jobExecutor.getIdleMillis();
    Date nextDueDate = getNextDueDate();
View Full Code Here

          jobDbids = queue.take();
          log.fine("took job(s) "+jobDbids+" from queue");

          for (Long jobDbid: jobDbids) {
            CommandService commandService = jobExecutor.getCommandExecutor();
            commandService.execute(new ExecuteJobCommand(jobDbid));
          }
        } catch (InterruptedException e) {
          log.finest("waiting for acquired jobs got interrupted");
        } catch (Exception e) {
          log.log(Level.SEVERE, "exception in job executor thread", e);
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.