Package org.activiti.engine.impl.interceptor

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


      q.addGroup(qn);
    }

    ActivitiContextFactoryImpl.CustomStandaloneProcessEngineConfiguration processEngineConfiguration = getProcessEngineConfiguration();
    CommandExecutor commandExecutorTxRequired = processEngineConfiguration.getCommandExecutorTxRequired();
    List<Task> tasks = commandExecutorTxRequired.execute(new Command<List<Task>>() {
      @Override
      public List<Task> execute(CommandContext commandContext) {
        if (page != null) {
          return commandContext.getDbSqlSession().selectList("selectTaskByQueryCriteria_Enhanced", q, page);
        }
View Full Code Here


  }
 
  private void cleanDB() {
    String jobId = managementService.createJobQuery().singleResult().getId();
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    commandExecutor.execute(new DeleteJobsCmd(jobId));
  }

  @Deployment
  public void testVersionUpgradeShouldCancelJobs() throws Exception {
    ClockUtil.setCurrentTime(new Date());
View Full Code Here

    try {
      repositoryService.createDeployment().addClasspathResource("org/activiti/engine/test/bpmn/parse/BpmnParseTest.testParseDiagramInterchangeElements.bpmn20.xml").deploy();

      // Graphical information is not yet exposed publicly, so we need to do some plumbing
      CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
      ProcessDefinitionEntity processDefinitionEntity = commandExecutor.execute(new Command<ProcessDefinitionEntity>() {
        public ProcessDefinitionEntity execute(CommandContext commandContext) {
          return Context.getProcessEngineConfiguration()
                        .getDeploymentCache()
                        .findDeployedLatestProcessDefinitionByKey("myProcess");
        }
View Full Code Here

  @Deployment
  public void testParseDiagramInterchangeElements() {

    // Graphical information is not yet exposed publicly, so we need to do some plumbing
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    ProcessDefinitionEntity processDefinitionEntity = commandExecutor.execute(new Command<ProcessDefinitionEntity>() {
      public ProcessDefinitionEntity execute(CommandContext commandContext) {
        return Context
          .getProcessEngineConfiguration()
          .getDeploymentCache()
          .findDeployedLatestProcessDefinitionByKey("myProcess");
View Full Code Here

  }
 
  @Deployment
  public void testParseNamespaceInConditionExpressionType() {
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    ProcessDefinitionEntity processDefinitionEntity = commandExecutor.execute(new Command<ProcessDefinitionEntity>() {
      public ProcessDefinitionEntity execute(CommandContext commandContext) {
        return Context
          .getProcessEngineConfiguration()
          .getDeploymentCache()
          .findDeployedLatestProcessDefinitionByKey("resolvableNamespacesProcess");
View Full Code Here

      log.severe(outputMessage.toString());
     
      log.info("dropping and recreating db");
     
      CommandExecutor commandExecutor = ((ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getCommandExecutorTxRequired();
      commandExecutor.execute(new Command<Object>() {
        public Object execute(CommandContext commandContext) {
          DbSqlSession session = commandContext.getSession(DbSqlSession.class);
          session.dbSchemaDrop();
          session.dbSchemaCreate();
          return null;
View Full Code Here

      cleanPostgres.execute();
     
    } else {
   
      CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
      commandExecutor.execute(new Command<Object> (){
        public Object execute(CommandContext commandContext) {
          commandContext
            .getSession(DbSqlSession.class)
            .dbSchemaDrop();
          return null;
View Full Code Here

  public void execute() {
    try {
      ProcessEngineConfigurationImpl processEngineConfiguration = UpgradeUtil.createProcessEngineConfiguration("postgres");
      processEngineConfiguration.buildProcessEngine();
      CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
      commandExecutor.execute(new Command<Object>() {

        public Object execute(CommandContext commandContext) {
          try {
            Connection connection = commandContext.getSession(DbSqlSession.class).getSqlSession().getConnection();
            connection.setAutoCommit(false);
View Full Code Here

    } catch (ActivitiException e) {}
  }
 
  private void createJobWithoutExceptionMsg() {
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    commandExecutor.execute(new Command<Void>() {
      public Void execute(CommandContext commandContext) {
        JobManager jobManager = commandContext.getJobManager();
       
        timerEntity = new TimerEntity();
        timerEntity.setLockOwner(UUID.randomUUID().toString());
View Full Code Here

   
  }
 
  private void createJobWithoutExceptionStacktrace() {
    CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutorTxRequired();
    commandExecutor.execute(new Command<Void>() {
      public Void execute(CommandContext commandContext) {
        JobManager jobManager = commandContext.getJobManager();
       
        timerEntity = new TimerEntity();
        timerEntity.setLockOwner(UUID.randomUUID().toString());
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.