protected internal virtual void RemoveVariableLocal(string variableName,
                                                            AbstractVariableScope sourceActivityExecution)
        {
            if (VariableStore.ContainsKey(variableName))
            {
                var variableInstance = VariableStore.GetVariable(variableName);

                InvokeVariableLifecycleListenersDelete(variableInstance, sourceActivityExecution);
                VariableStore.RemoveVariable(variableName);
            }
        }
        protected internal virtual void RemoveVariable(string variableName,
                                                       AbstractVariableScope sourceActivityExecution)
        {
            if (VariableStore.ContainsKey(variableName))
            {
                RemoveVariableLocal(variableName, sourceActivityExecution);
                return;
            }
            var parentVariableScope = ParentVariableScope;

            if (parentVariableScope != null)
            {
                if (sourceActivityExecution == null)
                {
                    parentVariableScope.RemoveVariable(variableName);
                }
                else
                {
                    parentVariableScope.RemoveVariable(variableName, sourceActivityExecution);
                }
            }
        }
 public virtual bool HasVariableLocal(string variableName)
 {
     return(VariableStore.ContainsKey(variableName));
 }