docs: protected void setProcessDefinitionVersionsAndIds(ParsedDeployment parsedDeployment,
                                                        Map<ProcessDefinitionEntity, ProcessDefinitionEntity> mapNewToOldProcessDefinitions) {
          CommandContext commandContext = Context.getCommandContext();
  
          for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
              int version = 1;
  
              ProcessDefinitionEntity latest = mapNewToOldProcessDefinitions.get(processDefinition);
              if (latest != null) {
                  version = latest.getVersion() + 1;
              }
  
              processDefinition.setVersion(version);
              processDefinition.setId(getIdForNewProcessDefinition(processDefinition));
  
              if (commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
                  commandContext.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(ActivitiEventBuilder.createEntityEvent(ActivitiEventType.ENTITY_CREATED,
                                                                                                                                           processDefinition));
              }
          }
      }