Exemplo n.º 1
0
        public virtual object Execute(CommandContext commandContext)
        {
            EnsureUtil.EnsureNotNull("executionId", ExecutionId);
            EnsureUtil.EnsureNotNull("variableName", VariableName);

            ExecutionEntity execution = commandContext.ExecutionManager.FindExecutionById(ExecutionId);

            EnsureUtil.EnsureNotNull("execution " + ExecutionId + " doesn't exist", "execution", execution);

            CheckGetExecutionVariable(execution, commandContext);

            var value = new object();

            if (IsLocal)
            {
                value = execution.GetVariableLocal(VariableName, true);
            }
            else
            {
                value = execution.GetVariable(VariableName, true);
            }

            return value;
        }