docs: public ProcessDefinitionCacheEntry resolveProcessDefinition(ProcessDefinition processDefinition) {
      String processDefinitionId = processDefinition.getId();
      String deploymentId = processDefinition.getDeploymentId();
  
      ProcessDefinitionCacheEntry cachedProcessDefinition = processDefinitionCache.get(processDefinitionId);
  
      if (cachedProcessDefinition == null) {
        CommandContext commandContext = Context.getCommandContext();
        DeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);
        deployment.setNew(false);
        deploy(deployment, null);
        cachedProcessDefinition = processDefinitionCache.get(processDefinitionId);
  
        if (cachedProcessDefinition == null) {
          throw new ActivitiException("deployment '" + deploymentId + "' didn't put process definition '" + processDefinitionId + "' in the cache");
        }
      }
      return cachedProcessDefinition;
    }