'Camunda redeploy dmn java way

Deployed my dmn.

 ProcessEngine processEngine = ProcessEngineConfiguration
        .createStandaloneProcessEngineConfiguration()
        .setJdbcUrl("jdbc:h2:./camunda-db/process-engine;DB_CLOSE_DELAY=1000")
        .setDatabaseSchemaUpdate("true")
        .setJobExecutorActivate(true)
        .buildProcessEngine();
    
    processEngine.getRepositoryService()
        .createDeployment()
        .addClasspathResource("dmn/test.dmn")
        .deploy();
    

I would like to deploy new version of the same dmn. I found decision only with rest api way like in this link,

https://docs.camunda.org/manual/7.9/reference/rest/deployment/post-redeploy-deployment/

i would like to make it using java api way (using ProcessEngine or something from Camunda library). It is possible?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source