Package org.activiti.spring

Examples of org.activiti.spring.SpringProcessEngineConfiguration


    }
  }
 
  @Bean(name="processEngineConfiguration")
  public ProcessEngineConfigurationImpl processEngineConfiguration() {
    SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();
    processEngineConfiguration.setDataSource(dataSource());
    processEngineConfiguration.setDatabaseSchemaUpdate(environment.getProperty("engine.schema.update", "true"));
    processEngineConfiguration.setTransactionManager(annotationDrivenTransactionManager());
    processEngineConfiguration.setJobExecutorActivate(Boolean.valueOf(
        environment.getProperty("engine.activate.jobexecutor", "false")));
    processEngineConfiguration.setHistory(environment.getProperty("engine.history.level", "full"));
   
    List<AbstractFormType> formTypes = new ArrayList<AbstractFormType>();
    formTypes.add(new UserFormType());
    formTypes.add(new ProcessDefinitionFormType());
    formTypes.add(new MonthFormType());
    processEngineConfiguration.setCustomFormTypes(formTypes);
   
    return processEngineConfiguration;
  }
View Full Code Here


    }
  }
 
  @Bean(name="processEngineConfiguration")
  public ProcessEngineConfigurationImpl processEngineConfiguration() {
    SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();
    processEngineConfiguration.setDataSource(dataSource());
    processEngineConfiguration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
    processEngineConfiguration.setTransactionManager(annotationDrivenTransactionManager());
    processEngineConfiguration.setJobExecutorActivate(false);
    processEngineConfiguration.setAsyncExecutorEnabled(true);
    processEngineConfiguration.setAsyncExecutorActivate(false);
    processEngineConfiguration.setHistoryLevel(HistoryLevel.FULL);
    return processEngineConfiguration;
  }
View Full Code Here

    }
  }
 
  @Bean(name="processEngineConfiguration")
  public ProcessEngineConfigurationImpl processEngineConfiguration() {
    SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();
    processEngineConfiguration.setDataSource(dataSource);
    processEngineConfiguration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
    processEngineConfiguration.setTransactionManager(transactionManager);
    processEngineConfiguration.setJobExecutorActivate(false);
    processEngineConfiguration.setAsyncExecutorEnabled(true);
    processEngineConfiguration.setAsyncExecutorActivate(false);
    processEngineConfiguration.setJpaEntityManagerFactory(entityManagerFactory);
    processEngineConfiguration.setJpaHandleTransaction(false);
    processEngineConfiguration.setJpaHandleTransaction(false);
    processEngineConfiguration.setHistoryLevel(HistoryLevel.FULL);
    return processEngineConfiguration;
  }
View Full Code Here

    }
  }
 
  @Bean(name="processEngineConfiguration")
  public ProcessEngineConfigurationImpl processEngineConfiguration() {
    SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();
    processEngineConfiguration.setDataSource(dataSource());
    processEngineConfiguration.setDatabaseSchemaUpdate(environment.getProperty("engine.schema.update", "true"));
    processEngineConfiguration.setTransactionManager(annotationDrivenTransactionManager());
    processEngineConfiguration.setJobExecutorActivate(Boolean.valueOf(
        environment.getProperty("engine.activate.jobexecutor", "false")));
    processEngineConfiguration.setHistory(environment.getProperty("engine.history.level", "full"));
   
    List<AbstractFormType> formTypes = new ArrayList<AbstractFormType>();
    formTypes.add(new UserFormType());
    formTypes.add(new ProcessDefinitionFormType());
    formTypes.add(new MonthFormType());
    processEngineConfiguration.setCustomFormTypes(formTypes);
   
    return processEngineConfiguration;
  }
View Full Code Here

    public void processEngineWithJpaEntityManager() throws Exception {
        AnnotationConfigApplicationContext context = this.context(DataSourceAutoConfiguration.class,
                HibernateJpaAutoConfiguration.class, JpaProcessEngineAutoConfiguration.JpaConfiguration.class);
        Assert.assertNotNull("entityManagerFactory should not be null", context.getBean(EntityManagerFactory.class));
        Assert.assertNotNull("the processEngine should not be null!", context.getBean(ProcessEngine.class));
        SpringProcessEngineConfiguration configuration = context.getBean(SpringProcessEngineConfiguration.class);
        Assert.assertNotNull("the " + SpringProcessEngineConfiguration.class.getName() + " should not be null", configuration);
        Assert.assertNotNull(configuration.getJpaEntityManagerFactory());
    }
View Full Code Here

    @ConditionalOnMissingBean
    public SpringProcessEngineConfiguration springProcessEngineConfiguration(
            DataSource dataSource, EntityManagerFactory entityManagerFactory,
            PlatformTransactionManager transactionManager, SpringAsyncExecutor springAsyncExecutor) throws IOException {

      SpringProcessEngineConfiguration config = this.baseSpringProcessEngineConfiguration(dataSource,
          transactionManager, springAsyncExecutor);
      config.setJpaEntityManagerFactory(entityManagerFactory);
      config.setTransactionManager(transactionManager);
      config.setJpaHandleTransaction(false);
      config.setJpaCloseEntityManager(false);
      return config;
    }
View Full Code Here

    List<Resource> procDefResources = this.discoverProcessDefinitionResources(
        this.resourceLoader, this.activitiProperties.getProcessDefinitionLocationPrefix(),
        this.activitiProperties.getProcessDefinitionLocationSuffix(),
        this.activitiProperties.isCheckProcessDefinitions());

    SpringProcessEngineConfiguration conf = super.processEngineConfigurationBean(
        procDefResources.toArray(new Resource[procDefResources.size()]), dataSource,
        platformTransactionManager, springAsyncExecutor);

    conf.setDeploymentName(defaultText(activitiProperties.getDeploymentName(), conf.getDeploymentName()));
    conf.setDatabaseSchema(defaultText(activitiProperties.getDatabaseSchema(), conf.getDatabaseSchema()));
    conf.setDatabaseSchemaUpdate(defaultText(activitiProperties.getDatabaseSchemaUpdate(), conf.getDatabaseSchemaUpdate()));
   
    conf.setJobExecutorActivate(activitiProperties.isJobExecutorActivate());
    conf.setAsyncExecutorEnabled(activitiProperties.isAsyncExecutorEnabled());
    conf.setAsyncExecutorActivate(activitiProperties.isAsyncExecutorActivate());
   
    conf.setMailServerHost(activitiProperties.getMailServerHost());
    conf.setMailServerPort(activitiProperties.getMailServerPort());


    return conf;
  }
View Full Code Here

                                                                         DataSource dataSource,
                                                                         PlatformTransactionManager transactionManager,
                                                                         SpringAsyncExecutor springAsyncExecutor)
        throws IOException {

    SpringProcessEngineConfiguration engine = new SpringProcessEngineConfiguration();
    if (processDefinitions != null && processDefinitions.length > 0) {
      engine.setDeploymentResources(processDefinitions);
    }
    engine.setDataSource(dataSource);
    engine.setTransactionManager(transactionManager);

    if (null != springAsyncExecutor) {
      engine.setAsyncExecutorEnabled(true);
      engine.setAsyncExecutor(springAsyncExecutor);
    }

    return engine;
  }
View Full Code Here

TOP

Related Classes of org.activiti.spring.SpringProcessEngineConfiguration

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.