public void Fill(WfCreateActivityParamCollection capc, PropertyDefineCollection definedProperties)
        {
            definedProperties.NullCheck("definedProperties");

            if (this._Role != null)
            {
                SOARoleContext.DoAction(this._Role, this.ProcessInstance, (context) =>
                                        ((SOARole)(this._Role)).FillCreateActivityParams(capc, definedProperties)
                                        );
            }
        }
Beispiel #2
0
 protected internal override void FillUsers(OguDataCollection <IUser> users)
 {
     if (this._Role != null)
     {
         SOARoleContext.DoAction(this._Role, this.ProcessInstance, (context) =>
         {
             foreach (IOguObject obj in this._Role.ObjectsInRole)
             {
                 FillObjectToUsers(users, obj);
             }
         });
     }
 }
        public void Fill(WfCreateActivityParamCollection capc, PropertyDefineCollection definedProperties)
        {
            SOARoleContext.DoAction(this.PropertyDefinitions, this.ProcessInstance, (context) =>
            {
                SOARolePropertyRowCollection matchedRows = this.Rows.QueryWithoutCondition(context.QueryParams);

                matchedRows = matchedRows.ExtractMatrixRows();

                matchedRows = this.MergeExternalMatrix(matchedRows, context.QueryParams);

                matchedRows = matchedRows.FilterByConditionColumn();

                matchedRows.FillCreateActivityParams(capc, this.PropertyDefinitions, definedProperties);
            });
        }
        public void DoCurrentRoleAction(IWfProcess process, Action <SOARole, string> action)
        {
            if (action != null)
            {
                string auCodeName = GetCurrentAdministrativeUnitCodeName(process);

                SOARole role = this.GetSOARole(auCodeName);

                if (role != null)
                {
                    SOARoleContext.DoAction(role, process, (context) =>
                                            action(role, auCodeName)
                                            );
                }
            }
        }
        protected internal override void FillUsers(OguDataCollection <IUser> users)
        {
            SOARoleContext.DoAction(this.PropertyDefinitions, this.ProcessInstance, (context) =>
            {
                SOARolePropertyRowCollection matchedRows = this.Rows.QueryWithoutCondition(context.QueryParams);

                matchedRows = matchedRows.ExtractMatrixRows();

                matchedRows = this.MergeExternalMatrix(matchedRows, context.QueryParams);

                matchedRows = matchedRows.FilterByConditionColumn();

                foreach (SOARolePropertyRowUsers rowUsers in matchedRows.GenerateRowsUsers())
                {
                    foreach (IUser user in rowUsers.Users)
                    {
                        if (users.Contains(user) == false)
                        {
                            users.Add(user);
                        }
                    }
                }
            });
        }
        protected internal override void FillUsers(OguDataCollection <IUser> users)
        {
            if (this._Role != null)
            {
                bool includeMatrixUsers = ServiceBrokerContext.Current.Context.GetValue("includeMatrixUsers", true);

                try
                {
                    ServiceBrokerContext.Current.Context["includeMatrixUsers"] = false;

                    SOARoleContext.DoAction(this._Role, this.ProcessInstance, (context) =>
                    {
                        foreach (IOguObject obj in this._Role.ObjectsInRole)
                        {
                            FillObjectToUsers(users, obj);
                        }
                    });
                }
                finally
                {
                    ServiceBrokerContext.Current.Context["includeMatrixUsers"] = includeMatrixUsers;
                }
            }
        }