cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment Strategy

rafaelduqueestr
Champ in-the-making
Champ in-the-making
Hi everyone,
I'm using activiti with spring and I have a dought about which is the best strategy for deployment process definitions.
Currently I'm using automatic deployment like:


@Configuration
public class ActivitiConfiguration {

    @Bean
    public SpringProcessEngineConfiguration processEngineConfiguration(DataSource dataSource,
                                                                       PlatformTransactionManager transactionManager,
                                                                       EntityManagerFactory entityManagerFactory) {
        SpringProcessEngineConfiguration engineConfiguration = new SpringProcessEngineConfiguration();
        engineConfiguration.setDataSource(dataSource);
        engineConfiguration.setTransactionManager(transactionManager);
        engineConfiguration.setJpaEntityManagerFactory(entityManagerFactory);
        engineConfiguration.setHistory(HistoryLevel.FULL.getKey());
        engineConfiguration.setDeploymentResources(deploymentResources());
        engineConfiguration.setDeploymentMode("single-resource");

        return engineConfiguration;
    }

    private Resource[] deploymentResources() {
        Resource[] processResource = new Resource[1];
        processResource[0] = new ClassPathResource("bpm/activiti/XPTOProcess.bpmn20.xml");
        return  processResource;
    }

    @Bean
    public ProcessEngine processEngine(SpringProcessEngineConfiguration springProcessEngineConfiguration,
                                       ApplicationContext applicationContext) throws Exception {
        ProcessEngineFactoryBean processEngineFactoryBean = new ProcessEngineFactoryBean();
        processEngineFactoryBean.setProcessEngineConfiguration(springProcessEngineConfiguration);
        processEngineFactoryBean.setApplicationContext(applicationContext);
        return processEngineFactoryBean.getObject();
    }
}

Every time I run the app in jboss a new version of definition process is created, even if any changes in XPTOProcess.bpmn20.xml.

How the activiti engine works with the differences between versions of definition process? (there is nothing about this in the user guide section 6.3)
10 REPLIES 10

rafaelduqueestr
Champ in-the-making
Champ in-the-making
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.