Here is the answer to my question,
var processEngine: ProcessEngine = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration.buildProcessEngine() val repositoryService: RepositoryService = processEngine.getRepositoryService repositoryService.deleteDeployment(deploymentId,true)
This helps to have an identical identifier for the process definition whenever the model is updated.
source share