Click or drag to resize

RuntimeServiceRemoveGroupsFromUser Method

Removes groups from a user. 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.3.3.0 (8.3.3.20240926)
Syntax
public void RemoveGroupsFromUser(
	string username,
	string groupsDefinition
)

Parameters

username
Type: SystemString
Username
groupsDefinition
Type: SystemString
Definition of a group list as an XML string. Element names are case sensitive.
Remarks
Available since WorkflowGen version: 6.2.0

The method receives a list of groups to remove from the user. 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.

UserId (int)Specifies the user id. Supersedes the username.
IgnoreMissingAssociations (bool)Sets whether or not to return an error when an association (group) is missing from the target. Default = true.

Sample groupsDefinition:
XML
<Groups>
  <Group>
    <Name>Group1</Name>
  </Group>
  <Group>
    <Name>Group2</Name>
  </Group>
</Groups>

Sample code:
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService();
RuntimeServiceWebService.UserHeader myUserHeader = new RuntimeServiceWebService.UserHeader();
myRuntimeService.UserHeaderValue = myUserHeader;

myUserHeader.UserId = userId;
myUserHeader.IgnoreMissingAssociations = ignoreMissingAssociations;

myRuntimeService.RemoveGroupsFromUser(username, groupsDefinition);

See Also