Exemplo n.º 1
0
        protected internal virtual void InitializeTaskCandidateGroups(TaskEntity task, IVariableScope variableScope)
        {
            var candidateGroupIdExpressions = taskDefinition.CandidateGroupIdExpressions;

            foreach (var groupIdExpr in candidateGroupIdExpressions)
            {
                var value = groupIdExpr.GetValue(variableScope);

                if (value is string)
                {
                    var candiates = ExtractCandidates((string)value);
                    task.AddCandidateGroups(candiates);
                }
                else if (value is ICollection <string> )
                {
                    task.AddCandidateGroups(((ICollection <string>)value).Distinct().ToArray());
                }
            }
        }