Package org.jbpm.api.job

Examples of org.jbpm.api.job.Job


    private Workflow convertToWorkflow(ProcessInstance instance, Locale locale) {
        final Workflow workflow = new Workflow(instance.getName(), instance.getId(), key);
        final WorkflowDefinition definition = getWorkflowDefinitionById(instance.getProcessDefinitionId(), locale);
        workflow.setWorkflowDefinition(definition);
        workflow.setAvailableActions(getAvailableActions(instance.getId(), locale));
        Job job = managementService.createJobQuery().timers().processInstanceId(instance.getId()).uniqueResult();
        if (job != null) {
            workflow.setDuedate(job.getDueDate());
        }
        workflow.setStartTime(historyService.createHistoryProcessInstanceQuery().processInstanceId(instance.getId()).orderAsc(HistoryProcessInstanceQuery.PROPERTY_STARTTIME).uniqueResult().getStartTime());
       
        Object user = executionService.getVariable(instance.getId(), "user");
        if (user != null) {
View Full Code Here


        );
        query.setLong("executionDbid", executionDbid);
        query.setMaxResults(1);
        Long messageDbid = (Long) query.uniqueResult();
        ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(messageDbid);
        Job job = executeJobCommand.execute(environment);
        return job.getExecution();
      }
    });
  }
View Full Code Here

        );
        query.setLong("timerDbid", timerDbid);
        query.setMaxResults(1);
        Long timerDbid = (Long) query.uniqueResult();
        ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(timerDbid);
        Job job = executeJobCommand.execute(environment);
        return job.getExecution();
      }
    });
  }
View Full Code Here

    if (timerSession!=null) {
      log.debug("destroying timers of "+this);
      List<Timer> timers = timerSession.findTimersByExecution(this);
      for (Timer timer: timers) {
       
        Job job = Environment.getFromCurrent(JobImpl.class, false);
        if (timer!=job) {
          timerSession.cancel(timer);
        }
      }
    }
View Full Code Here

    if (timerSession!=null) {
      log.debug("destroying timers of "+this);
      List<Timer> timers = timerSession.findTimersByExecution(this);
      for (Timer timer: timers) {
       
        Job job = EnvironmentImpl.getFromCurrent(JobImpl.class, false);
        if (timer!=job) {
          timerSession.cancel(timer);
        }
      }
    }
View Full Code Here

        );
        query.setLong("executionDbid", executionDbid);
        query.setMaxResults(1);
        Long messageDbid = (Long) query.uniqueResult();
        ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(messageDbid);
        Job job = executeJobCommand.execute(environment);
        return job.getExecution();
      }
    });
  }
View Full Code Here

        );
        query.setLong("timerDbid", timerDbid);
        query.setMaxResults(1);
        Long timerDbid = (Long) query.uniqueResult();
        ExecuteJobCmd executeJobCommand = new ExecuteJobCmd(timerDbid);
        Job job = executeJobCommand.execute(environment);
        return job.getExecution();
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.jbpm.api.job.Job

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.