protected internal virtual int?getLoopVariable(ActivityExecution execution, string variableName) { IntegerValue value = execution.getVariableLocalTyped(variableName); ensureNotNull("The variable \"" + variableName + "\" could not be found in execution with id " + execution.Id, "value", value); return(value.Value); }