protected ProcessDefinition findProcessDefinition ( String processDefinitionKey , String tenantId ) { if ( tenantId == null || ProcessEngineConfiguration . NO_TENANT_ID . equals ( tenantId ) ) { return Context . getProcessEngineConfiguration ( ) . getDeploymentManager ( ) . findDeployedLatestProcessDefinitionByKey ( processDefinitionKey ) ; } else { return Context . getProcessEngineConfiguration ( ) . getDeploymentManager ( ) . findDeployedLatestProcessDefinitionByKeyAndTenantId ( processDefinitionKey , tenantId ) ; } }
Allow subclass to determine which version of a process to start .