Methods / Group, Role, and Rights |
Name | Type | Description |
---|---|---|
roleName | string | A string that contains the name of a role. |
description | string | A string that contains the description of an entity. |
rights | WFAccessRights | Array of index values that specifies the rights that are assigned to the Role. See the following table for appropriate indexes. WFAccessRights provides the enums for rights. See the sample code for more information. |
enabled | bool | A Boolean value: True enables the entity; False disables the entity. |
IWFAdminService svc = GetAdminService(); string roleName = ...// for example, "TestRole" string description = ...// for example, "This is new description for TestRole" List<int> list = new List<int>(); list.Add(WFAccessRights.AddModifyGroup); list.Add(WFAccessRights.AddModifyRole); list.Add(WFAccessRights.AddModifyUser); list.Add(WFAccessRights.AddProcessTemplate); list.Add(WFAccessRights.AddRemoveModifyDelegation); int[] rights = list.ToArray(); try { WFRole updatedRole = svc.UpdateRole(roleName, description rights, true); } catch( Exception ex) { Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex)); }