Get Work List By User ID

API Type

Web Services

Description

Retrieves a work item collection by specifying a user name and work item status.

Syntax

public virtual WFManualWorkItem[] GetWorkListByUserID(string UserName, string Status)

Parameters

Name Description

UserName

Definition:
Specifies a qualified user name of the instance. A qualified user name formats as [Domain Name]\[Logon Username] or [Local host name]\[Logon Username].
Type
string
Allowed Values:
A valid user name for a registered AgilePoint user.

Status

Definition:
The status of the work item.
Type
string
Allowed Values:
  • New - The work item is in a pool, more than one participant shares the work item and needs to be assigned.
  • Assigned - The work item is assigned to a participant and needs to be performed.
  • Removed - The work item was originally in a pool (status is new), and didn't get assigned to the user.
  • Completed - The work item is completed.
  • Reassigned - The work item is re-assigned to the other user.
  • Canceled - The work item is canceled.
  • Overdue - The work item is overdue.
  • Carbon - The work item is a carbon copy that does not affect process instance running.

Output

Array of WFManualWorkItem objects.

Example

//Get all WFManualWorkItem assigned to user
IWFWorkflowService svc = GetWorkflowService();
string userID = …// for example, @"Demo3\Administrator";
string Status= string.format("{0};{1}",
WFManualWorkItem.ASSIGNED, WFManualWorkItem.OVERDUE);

try
	{
    WFManualWorkItem[] workItems = svc.GetWorkListByUserID(userID,
    Status);
    foreach (WFManualWorkItem workItem in workItems)
        {
        Console.WriteLine("{0}", workItem.ApplName);
        Console.WriteLine("{0}", workItem.AssignedDate);
        Console.WriteLine("{0}", workItem.DefName);
        Console.WriteLine("{0}", workItem.DueDate);
        }
	}

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

Supported Versions

3.2.0.4 and higher