cancel
Showing results for 
Search instead for 
Did you mean: 

Setting deployment mode in CDI Deployment Environment

clp207
Champ in-the-making
Champ in-the-making
I am deploying my processes in a CDI application like this

      CdiJtaProcessEngineConfiguration processEngineConfiguration = new CdiJtaProcessEngineConfiguration();
      processEngineConfiguration.setProcessEngineName("default");
      processEngineConfiguration.setDataSourceJndiName("java:jboss/datasources/activitiDS");
      …      
      processEngine = processEngineConfiguration.buildProcessEngine();
               
      RepositoryService repositoryService = processEngine.getRepositoryService();
      repositoryService.createDeployment()
        .addClasspathResource("Process.bpmn").enableDuplicateFiltering()
        .deploy();

Everytime I deploy my war, a new process version is deployed. The documentation talks about a deploymentMode for the spring process engine configuration. How do I set a deployment mode for the CdiJta process engine configuration?

3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
The enableDuplicateFiltering should be fine. One bootup, it checks all the deployments in the db and compares them on the xml level. So in theory that should work.

Does the same happen if you give the deployment a fixed name?

clp207
Champ in-the-making
Champ in-the-making
Sorry, but I am not sure what you mean by giving the deployment a fixed name.

clp207
Champ in-the-making
Champ in-the-making
Think I figured it out

  repositoryService.createDeployment().name("Process1")
    .addClasspathResource("Process1.bpmn").enableDuplicateFiltering()
    .deploy();

Thanks!