Examples of execute()


Examples of org.activiti.engine.impl.cmd.ActivateProcessDefinitionCmd.execute()

    String processDefinitionId = job.getProcessDefinitionId();
    boolean activateProcessInstances = getIncludeProcessInstances(cfgJson);
   
    ActivateProcessDefinitionCmd activateProcessDefinitionCmd =
            new ActivateProcessDefinitionCmd(processDefinitionId, null, activateProcessInstances, null, job.getTenantId());
    activateProcessDefinitionCmd.execute(commandContext);
  }
 
}
View Full Code Here

Examples of org.activiti.engine.impl.cmd.GetBpmnModelCmd.execute()

                .findHistoricProcessInstance(processInstanceId);
        String processDefinitionId = historicProcessInstance
                .getProcessDefinitionId();
        GetBpmnModelCmd getBpmnModelCmd = new GetBpmnModelCmd(
                processDefinitionId);
        BpmnModel bpmnModel = getBpmnModelCmd.execute(Context
                .getCommandContext());
        Point point = getMinXAndMinY(bpmnModel);
        this.minX = point.x;
        this.minY = point.y;
        this.minX = (this.minX <= 5) ? 5 : this.minX;
View Full Code Here

Examples of org.activiti.engine.impl.cmd.GetDeploymentProcessDefinitionCmd.execute()

                .getHistoricProcessInstanceEntityManager()
                .findHistoricProcessInstance(processInstanceId)
                .getProcessDefinitionId();
        GetDeploymentProcessDefinitionCmd cmd = new GetDeploymentProcessDefinitionCmd(
                processDefinitionId);
        processDefinitionEntity = cmd.execute(Context.getCommandContext());
    }

    public void fetchHistoricActivityInstances() {
        HistoricActivityInstanceQueryImpl historicActivityInstanceQueryImpl = new HistoricActivityInstanceQueryImpl();
        // historicActivityInstanceQueryImpl.processInstanceId(processInstanceId)
View Full Code Here

Examples of org.activiti.engine.impl.cmd.SuspendProcessDefinitionCmd.execute()

    String processDefinitionId = job.getProcessDefinitionId();
    boolean suspendProcessInstances = getIncludeProcessInstances(cfgJson);
   
    SuspendProcessDefinitionCmd suspendProcessDefinitionCmd =
            new SuspendProcessDefinitionCmd(processDefinitionId, null, suspendProcessInstances, null, job.getTenantId());
    suspendProcessDefinitionCmd.execute(commandContext);
  }
 
}
View Full Code Here

Examples of org.activiti.engine.impl.db.upgrade.DbUpgradeStep.execute()

          } catch (ActivitiException e) {
            throw new ActivitiException("database update java class '"+upgradestepClassName+"' can't be instantiated: "+e.getMessage(), e);
          }
          try {
            log.fine("executing upgrade step java class "+upgradestepClassName);
            dbUpgradeStep.execute(this);
          } catch (Exception e) {
            throw new ActivitiException("error while executing database update java class '"+upgradestepClassName+"': "+e.getMessage(), e);
          }
         
        } else if (line.length()>0) {
View Full Code Here

Examples of org.activiti.engine.impl.interceptor.CommandExecutor.execute()

  }

  public static void main(String[] args) {
    ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
    CommandExecutor commandExecutor = processEngine.getProcessEngineConfiguration().getCommandExecutorTxRequired();
    commandExecutor.execute(new Command<Object> (){
      public Object execute(CommandContext commandContext) {
        commandContext
          .getSession(DbSqlSession.class)
          .dbSchemaUpdate();
        return null;
View Full Code Here

Examples of org.activiti.engine.impl.interceptor.RetryInterceptor.execute()

  public void testRetryInterceptor() {
    RetryInterceptor retryInterceptor = new RetryInterceptor();
    retryInterceptor.setNext(new CommandInvoker());
    try {
      retryInterceptor.execute(new CommandConfig(), new CommandThrowingOptimisticLockingException());
      fail("ActivitiException expected.");
    } catch (ActivitiException e) {
      assertTrue(e.getMessage().contains(retryInterceptor.getNumOfRetries()+" retries failed"));
    }
  }
View Full Code Here

Examples of org.activiti.engine.impl.jobexecutor.JobHandler.execute()

      execution = commandContext.getExecutionEntityManager().findExecutionById(executionId);
    }
   
    Map<String, JobHandler> jobHandlers = Context.getProcessEngineConfiguration().getJobHandlers();
    JobHandler jobHandler = jobHandlers.get(jobHandlerType);
    jobHandler.execute(this, jobHandlerConfiguration, execution, commandContext);
  }
 
  public void insert() {
    Context.getCommandContext()
      .getDbSqlSession()
View Full Code Here

Examples of org.activiti.engine.impl.persistence.entity.JobEntity.execute()

    if(jobExecutorContext != null) { // if null, then we are not called by the job executor    
      jobExecutorContext.setCurrentJob(job);
    }
   
    try {
      job.execute(commandContext);
    } catch (RuntimeException exception) {
      // When transaction is rolled back, decrement retries
      CommandExecutor commandExecutor = Context
        .getProcessEngineConfiguration()
        .getCommandExecutorTxRequiresNew();
View Full Code Here

Examples of org.activiti.engine.impl.pvm.delegate.ActivityBehavior.execute()

                execution.getProcessDefinitionId(),
                (String) activity.getProperties().get("type"),
                activity.getActivityBehavior().getClass().getCanonicalName()));
      }
     
      activityBehavior.execute(execution);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      LogMDC.putMDCExecution(execution);
      throw new PvmException("couldn't execute activity <"+activity.getProperty("type")+" id=\""+activity.getId()+"\" ...>: "+e.getMessage(), 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.