docs: @Override
    public ExecutionEntity createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey, String caseInstanceId) {
      shouldQueryForSubprocessInstance = true;
  
      ExecutionEntity subProcessInstance = (ExecutionEntity) super.createSubProcessInstance(processDefinition, businessKey, caseInstanceId);
  
      // inherit the tenant-id from the process definition
      String tenantId = ((ProcessDefinitionEntity) processDefinition).getTenantId();
      if (tenantId != null) {
        subProcessInstance.setTenantId(tenantId);
      }
      else {
        // if process definition has no tenant id, inherit this process instance's tenant id
        subProcessInstance.setTenantId(this.tenantId);
      }
  
      fireHistoricActivityInstanceUpdate();
  
      return subProcessInstance;
    }