Click or drag to resize

RuntimeServiceRemoveUsersFromGroup Method

Removes users from 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: 7.15.0.29499 (7.15.0.201904253)
Syntax
public void RemoveUsersFromGroup(
	string groupName,
	string usersDefinition
)

Parameters

groupName
Type: SystemString
Group name
usersDefinition
Type: SystemString
Definition of a users list to associate to the group as an XML string. 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. For parameters that support both a name and an id, the name will be ignored if an id is set. 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. Supercedes the group name.
directoryId (int)Specifies the directory id. Supercedes 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.RemoveUsersFromGroup(groupName, usersDefinition);

See Also