Exemple #1
0
 public void startJobExecuter() throws Exception {
   log.debug("Starting JBPM job executer now...");
   Jbpm.instance().getJbpmConfiguration().startJobExecutor();
   if (Jbpm.instance().getJbpmConfiguration().getJobExecutor().isStarted()) {
     log.info("JBPM Job executer has successfully started.");
   } else {
     log.error("Could not start JBPM Job executer for unknown reason.");
   }
 }
Exemple #2
0
  public ProcessInstance getProcessInstance(Long id) {
    JbpmContext context = Jbpm.instance().getJbpmConfiguration().createJbpmContext();
    // log.debug("!!!!!!!!!!!!!!!!!!!!!!!!!: " + context);
    /*
    try {
    	log.debug("!!!!!!!!!!!!!!!!!!!!!!!!!: " + context.getConnection().isClosed());
    }catch(SQLException e) {
    	e.printStackTrace();
    }
    */

    return context.getProcessInstance(id);
  }
Exemple #3
0
  public void deployProcessDefinition(
      String xmlProcessDefinition, WorkflowProcessDef wfProcessDefEntity)
      throws OperationException {
    try {
      ProcessDefinition pd = jbpm.getProcessDefinitionFromXml(xmlProcessDefinition);
      wfProcessDefEntity.setUniqueName(pd.getName());
      wfProcessDefEntity.setVersion(pd.getVersion());
      wfProcessDefEntity.setDescription(pd.getDescription());
      log.trace("Deploying workflow process definition name #0", pd.getName());
      jbpmContext.deployProcessDefinition(pd);
      wfProcessDefEntity.setProcessDefEngineKey(String.valueOf(pd.getId()));

      jbpmContext.getSession().flush();
      // }catch (JpdlException e) {
    } catch (Exception e) {
      throw new OperationException("Could not deploy process definition: " + e.getMessage());
    }
  }
Exemple #4
0
 public void endJobExecuter() {
   jbpm.getJbpmConfiguration().getJobExecutor().stop();
 }