protected ProcessDefinitionEntity findByKey(DeploymentCache deploymentCache, String processDefinitionKey) { if (isTenantIdSet) { return deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, processDefinitionTenantId); } else { return deploymentCache.findDeployedLatestProcessDefinitionByKey(processDefinitionKey); } }
protected ProcessDefinitionEntity findByKey(DeploymentCache deploymentCache, String processDefinitionKey) { if (isTenantIdSet) { return deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, processDefinitionTenantId); } else { return deploymentCache.findDeployedLatestProcessDefinitionByKey(processDefinitionKey); } }
public void execute(TimerJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { DeploymentCache deploymentCache = Context .getProcessEngineConfiguration() .getDeploymentCache(); String definitionKey = configuration.getTimerElementKey(); ProcessDefinition processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(definitionKey, tenantId); try { startProcessInstance(commandContext, tenantId, processDefinition); } catch (RuntimeException e) { throw e; } }
public void execute(TimerJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { DeploymentCache deploymentCache = Context .getProcessEngineConfiguration() .getDeploymentCache(); String definitionKey = configuration.getTimerElementKey(); ProcessDefinition processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(definitionKey, tenantId); try { startProcessInstance(commandContext, tenantId, processDefinition); } catch (RuntimeException e) { throw e; } }
public static ProcessDefinitionImpl getProcessDefinitionToCall(VariableScope execution, BaseCallableElement callableElement) { String processDefinitionKey = callableElement.getDefinitionKey(execution); String tenantId = callableElement.getDefinitionTenantId(execution); DeploymentCache deploymentCache = getDeploymentCache(); ProcessDefinitionImpl processDefinition = null; if (callableElement.isLatestBinding()) { processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId); } else if (callableElement.isDeploymentBinding()) { String deploymentId = callableElement.getDeploymentId(); processDefinition = deploymentCache.findDeployedProcessDefinitionByDeploymentAndKey(deploymentId, processDefinitionKey); } else if (callableElement.isVersionBinding()) { Integer version = callableElement.getVersion(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionAndTenantId(processDefinitionKey, version, tenantId); } else if (callableElement.isVersionTagBinding()) { String versionTag = callableElement.getVersionTag(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionTagAndTenantId(processDefinitionKey, versionTag, tenantId); } return processDefinition; }
public static ProcessDefinitionImpl getProcessDefinitionToCall(VariableScope execution, BaseCallableElement callableElement) { String processDefinitionKey = callableElement.getDefinitionKey(execution); String tenantId = callableElement.getDefinitionTenantId(execution); DeploymentCache deploymentCache = getDeploymentCache(); ProcessDefinitionImpl processDefinition = null; if (callableElement.isLatestBinding()) { processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId); } else if (callableElement.isDeploymentBinding()) { String deploymentId = callableElement.getDeploymentId(); processDefinition = deploymentCache.findDeployedProcessDefinitionByDeploymentAndKey(deploymentId, processDefinitionKey); } else if (callableElement.isVersionBinding()) { Integer version = callableElement.getVersion(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionAndTenantId(processDefinitionKey, version, tenantId); } else if (callableElement.isVersionTagBinding()) { String versionTag = callableElement.getVersionTag(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionTagAndTenantId(processDefinitionKey, versionTag, tenantId); } return processDefinition; }
protected ProcessDefinitionEntity findByKey(DeploymentCache deploymentCache, String processDefinitionKey) { if (isTenantIdSet) { return deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, processDefinitionTenantId); } else { return deploymentCache.findDeployedLatestProcessDefinitionByKey(processDefinitionKey); } }
public void execute(TimerJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { DeploymentCache deploymentCache = Context .getProcessEngineConfiguration() .getDeploymentCache(); String definitionKey = configuration.getTimerElementKey(); ProcessDefinition processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(definitionKey, tenantId); try { startProcessInstance(commandContext, tenantId, processDefinition); } catch (RuntimeException e) { throw e; } }
public static ProcessDefinitionImpl getProcessDefinitionToCall(VariableScope execution, BaseCallableElement callableElement) { String processDefinitionKey = callableElement.getDefinitionKey(execution); String tenantId = callableElement.getDefinitionTenantId(execution); DeploymentCache deploymentCache = getDeploymentCache(); ProcessDefinitionImpl processDefinition = null; if (callableElement.isLatestBinding()) { processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId); } else if (callableElement.isDeploymentBinding()) { String deploymentId = callableElement.getDeploymentId(); processDefinition = deploymentCache.findDeployedProcessDefinitionByDeploymentAndKey(deploymentId, processDefinitionKey); } else if (callableElement.isVersionBinding()) { Integer version = callableElement.getVersion(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionAndTenantId(processDefinitionKey, version, tenantId); } else if (callableElement.isVersionTagBinding()) { String versionTag = callableElement.getVersionTag(execution); processDefinition = deploymentCache.findDeployedProcessDefinitionByKeyVersionTagAndTenantId(processDefinitionKey, versionTag, tenantId); } return processDefinition; }