public virtual object GetValue(IVariableScope execution) { if (execution is ExecutionEntity) { return(GetProcessDefinitionTenantId(execution as ExecutionEntity)); } //if (execution is CaseExecutionEntity) // return GetCaseDefinitionTenantId((CaseExecutionEntity)execution); throw new ProcessEngineException("Unexpected execution of type " + execution.GetType().FullName); }
/// <summary> /// /// </summary> /// <param name="processEngineConfiguration"></param> /// <param name="variableScope"></param> public VariableScopeResolver(ProcessEngineConfigurationImpl processEngineConfiguration, IVariableScope variableScope) { this.processEngineConfiguration = processEngineConfiguration; if (variableScope == null) { throw new ActivitiIllegalArgumentException("variableScope cannot be null"); } if (variableScope is IExecutionEntity) { variableScopeKey = "execution"; } else if (variableScope is ITaskEntity) { variableScopeKey = "task"; } else { throw new ActivitiException("unsupported variable scope type: " + variableScope.GetType().FullName); } this.variableScope = variableScope; }