Get Role

API Type

Web Services

Description

Retrieves a role object by name.

Syntax

public virtual WFRole GetRole(string roleName);

Parameters

Name Description

roleName

Definition:
The name of a role.
Type
string
Allowed Values:
A valid role name.

Output

WFRole object with the specified role name.

Example

IWFAdminService svc = GetAdminService();
string rolName = ...// for example, "Administrators"

try
	{
    WFRole role = adminService.GetRole(rolName);
    Console.WriteLine("Name = '" + role.Name + "' Description = '" +
    role.Description + "'");
	}

catch (Exception ex)
	{
    Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
	}

/* This example produces the following results:
Name = 'Administrators' Description = 'Administrators have complete access to maintain system' */

Supported Versions

3.2.0.4 and higher