Click or drag to resize

RuntimeServiceAddUsersToGroup Method

Adds users to a group. Intended for web use only.

Namespace:  Advantys.Workflow.Web.Services.Processes.Runtime
Assembly:  Advantys.Workflow.Web.Services.Processes.Runtime (in Advantys.Workflow.Web.Services.Processes.Runtime.dll) Version: 8.1.3.0 (8.1.3.20220620)
Syntax
public void AddUsersToGroup(
	string groupName,
	string usersDefinition
)

Parameters

groupName
Type: SystemString
Group name
usersDefinition
Type: SystemString
Definition of the users to associate to the group. Element names are case sensitive.
Remarks
Available since WorkflowGen version: 6.2.0

The method receives a list of users to associate to the group.

Optional Parameters.

These parameters can be used in the query string or as parameters of the Headers object in the RuntimeService class instance. See example below.

GroupId (int)Specifies the group id. Supersedes the group name.
directoryId (int)Specifies the directory id. Supersedes the directory name.
directoryName (string)Specifies the directory name.
IgnoreMissingAssociations (bool)Sets whether or not to return an error when an association (group) is missing from the target. Default = true.

Sample users definition:
XML
<Users>
  <User>
    <Username>Username1</Username>
  </User>
  <User>
    <Username>Username2</Username>
  </User>
</Users>

Sample code:
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService();
RuntimeServiceWebService.GroupHeader myGroupHeader = new RuntimeServiceWebService.GroupHeader();
myRuntimeService.GroupHeaderValue = myGroupHeader;

myGroupHeader.IgnoreMissingAssociations = ignoreMissingAssociations;

myRuntimeService.AddUsersToGroup(groupName, usersDefinition);

See Also