How to set enableDuplicateFiltering to True at startup?

name: ‘camunda-bpm-spring-boot-starter’, version: ‘3.0.0’
generated spring boot app with spring initializer
Im using constructor injection

Hello

Problem description: Every time I restart my app & change 1 file , then all my *.bpmn files are redeployed with new version. I would like the app to redeploy only the changed file with new version.

If possible then how to enable duplicate filtering at spring boot startup ?

I have read this article but since it wont explain to a beginner there is not much I can do with this knowledge.

Hi Lionel

If I understand you have the same problem as described here.

In Spring Boot it is necessary to have an application.properties-File (or a similar yaml-File if you prefer) in your src\main\ressources-Folder. In this file you can have the settings as described here.

So for your requirement this would be the following entry:
camunda.bpm.application.deploy-changed-only=true

Does this help?

Kind regards
Björn

Hi

I created a new *.yml file & put it under : \src\main\resources\camunda-config.yml

Changed 1 workflow & restarted the the app. It still creates duplicate deployments. Am I missing something hire?

camunda-config.yml (49 Bytes)

Hi

When I download your file it is “camunda-config.yml.xml”. Can it be, that you have Windows and activated the “Hide file endings”-Setting?

And the file should be application.yaml and not in the syntax of properties but in the yaml-Syntax. You can see an example here.

Kind regards
Björn

I had to rename it to xml other vise it wont let me post the file in the forum.

PS: I also tried this approach but it simply errors out saying:

No qualifying bean of type ‘org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl’ available:
expected at least 1 bean which qualifies as autowire candidate. Dependency annotations:
{@org.springframework.beans.factory.annotation.Autowired(required=true)}

import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration("camundaProcessEngineConfiguration")
public class CamundaProcessEngineConfiguration {

    @Bean
    public SpringProcessEngineConfiguration processEngineConfiguration() {
        SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
        config.setDeployChangedOnly(true);
        return config;
    }
}

Why do you have this Configuration class? If you have an application.yaml you don’t need this.

Perhaps it’s easier if you begin with a working example like https://github.com/zhaw-gpi/twitter-review-prozess or https://github.com/zhaw-gpi/project-template (both of them are public made by me and a collegue). The examples are with application.properties instead of application.yaml, but that shouldn’t make a difference.

Maybe you can simply take a look inside my sample project & say if the camunda.bpm.application.deploy-changed-only=true is in the right file?

Rename file to *.zip file
ExampleApp.zip (1.1 MB)

I generated the springBoot example with: jhipsterOnline and gradle, then simply added camunda dependency & 2 bpmn files inside \src\main\resources\Process-definitions\

placed camunda.bpm.application.deploy-changed-only=true inside /src/main/resources/application.properties

And it still creates duplicates.

PS if you wish to launch this project:

jhipsterSampleApplication_noNodeModulesRequiresYarnInstall>yarn install
jhipsterSampleApplication_noNodeModulesRequiresYarnInstall>yarn start
jhipsterSampleApplication_noNodeModulesRequiresYarnInstall>gradlew or gradlew bootRun or ./gradlew

That example you posted gives me by the way:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.camunda.bpm:camunda-bom:pom:7.9.2-ee from/to camunda-bpm-ee (https://app.camunda.com/nexus/content/repositories/camunda-bpm-ee): Not authorized , ReasonPhrase:Unauthorized. @ line 67, column 25

Looks like I solved the problem

import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration;
import org.camunda.bpm.spring.boot.starter.configuration.impl.AbstractCamundaConfiguration;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CamundaConfiguration extends AbstractCamundaConfiguration {

@Override
public void preInit(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
    springProcessEngineConfiguration.setDeployChangedOnly(true);
}

}

1 Like