public static CmmnCaseDefinition getCaseDefinitionToCall(VariableScope execution, BaseCallableElement callableElement) { string caseDefinitionKey = callableElement.getDefinitionKey(execution); string tenantId = callableElement.getDefinitionTenantId(execution); DeploymentCache deploymentCache = DeploymentCache; CmmnCaseDefinition caseDefinition = null; if (callableElement.LatestBinding) { caseDefinition = deploymentCache.findDeployedLatestCaseDefinitionByKeyAndTenantId(caseDefinitionKey, tenantId); } else if (callableElement.DeploymentBinding) { string deploymentId = callableElement.DeploymentId; caseDefinition = deploymentCache.findDeployedCaseDefinitionByDeploymentAndKey(deploymentId, caseDefinitionKey); } else if (callableElement.VersionBinding) { int?version = callableElement.getVersion(execution); caseDefinition = deploymentCache.findDeployedCaseDefinitionByKeyVersionAndTenantId(caseDefinitionKey, version, tenantId); } return(caseDefinition); }
public static DecisionDefinition getDecisionDefinitionToCall(VariableScope execution, BaseCallableElement callableElement) { string decisionDefinitionKey = callableElement.getDefinitionKey(execution); string tenantId = callableElement.getDefinitionTenantId(execution); DeploymentCache deploymentCache = DeploymentCache; DecisionDefinition decisionDefinition = null; if (callableElement.LatestBinding) { decisionDefinition = deploymentCache.findDeployedLatestDecisionDefinitionByKeyAndTenantId(decisionDefinitionKey, tenantId); } else if (callableElement.DeploymentBinding) { string deploymentId = callableElement.DeploymentId; decisionDefinition = deploymentCache.findDeployedDecisionDefinitionByDeploymentAndKey(deploymentId, decisionDefinitionKey); } else if (callableElement.VersionBinding) { int?version = callableElement.getVersion(execution); decisionDefinition = deploymentCache.findDeployedDecisionDefinitionByKeyVersionAndTenantId(decisionDefinitionKey, version, tenantId); } else if (callableElement.VersionTagBinding) { string versionTag = callableElement.getVersionTag(execution); decisionDefinition = deploymentCache.findDeployedDecisionDefinitionByKeyVersionTagAndTenantId(decisionDefinitionKey, versionTag, tenantId); } return(decisionDefinition); }
public static ProcessDefinitionImpl getProcessDefinitionToCall(VariableScope execution, BaseCallableElement callableElement) { string processDefinitionKey = callableElement.getDefinitionKey(execution); string tenantId = callableElement.getDefinitionTenantId(execution); DeploymentCache deploymentCache = DeploymentCache; ProcessDefinitionImpl processDefinition = null; if (callableElement.LatestBinding) { processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId); } else if (callableElement.DeploymentBinding) { string deploymentId = callableElement.DeploymentId; processDefinition = deploymentCache.findDeployedProcessDefinitionByDeploymentAndKey(deploymentId, processDefinitionKey); } else if (callableElement.VersionBinding) { int?version = callableElement.getVersion(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionAndTenantId(processDefinitionKey, version, tenantId); } else if (callableElement.VersionTagBinding) { string versionTag = callableElement.getVersionTag(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionTagAndTenantId(processDefinitionKey, versionTag, tenantId); } return(processDefinition); }
protected internal virtual int?getVersion(CmmnActivityExecution execution) { CmmnExecution caseExecution = (CmmnExecution)execution; return(CallableElement.getVersion(caseExecution)); }