Exemple #1
0
        // 清空序列的变量
        public void ClearSequenceVariables(ISequenceFlowContainer sequence)
        {
            string        nameRegex     = CoreUtils.GetExactVariableNameRegex(sequence, _context.SessionId);
            Regex         varRegex      = new Regex(nameRegex);
            List <string> variableNames = new List <string>(_variables.Keys);

            foreach (string variableName in variableNames)
            {
                if (varRegex.IsMatch(variableName))
                {
                    // TODO 只将该值配置为null,不会删除变量定义
                    _variables[variableName] = null;
                }
            }
        }