Multiple Process Definitions

I have two bpmn diagrams under the folder processes. From the documentation, it will read this folder and create process definitions for them. For some reason, it is creating 13 for one of the diagrams.

running processEngine.getRepositoryService().createProcessDefinitionQuery().count() returns 14 and I see one of my diagrams has been deployed 13 times.

for(ProcessDefinition definition:processEngine.getRepositoryService().createProcessDefinitionQuery().list()) {"Process definition : "+definition.getName());

Shouldn’t there only be two since I only have two diagrams?

Every time there is a change to your model (the xml is compared), a new version is deployed. If you do .latestVersion() on that query, it should return 2 in this case.