public virtual IDictionary <string, object> Execute(ICommandContext commandContext)
        {
            // Verify existance of execution
            if (executionId is null)
            {
                throw new ActivitiIllegalArgumentException("executionId is null");
            }

            IExecutionEntity execution = commandContext.ExecutionEntityManager.FindById <IExecutionEntity>(executionId);

            if (execution == null)
            {
                throw new ActivitiObjectNotFoundException("execution " + executionId + " doesn't exist", typeof(IExecution));
            }

            if ((variableNames?.Count()).GetValueOrDefault(0) == 0)
            {
                // Fetch all
                if (isLocal)
                {
                    return(execution.VariablesLocal);
                }
                else
                {
                    return(execution.Variables);
                }
            }
            else
            {
                // Fetch specific collection of variables
                if (isLocal)
                {
                    return(execution.GetVariablesLocal(variableNames, false));
                }
                else
                {
                    return(execution.GetVariables(variableNames, false));
                }
            }
        }