Get Work List By User ID

API Type

Web Services

Description

Retrieves a human task (manual work item) collection by specifying a user name and task status.

Good to Know

  • Multiple status can be specified with a semicolon (;) delimited list.

Syntax

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

Parameters

NameDescription

UserName

Function:
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
Accepted Values:
A valid user name for a registered AgilePoint user.

Status

Function:
The status of the work item.
Type
string
Accepted 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

Code Examples in the AgilePoint NX Documentation

The AgilePoint NX Product Documentation is intended as a basic reference to help you understand how to complete basic coding tasks, such as make API or JavaScript method calls. Code examples that show specific use cases, the solutions to specific business problems, or detailed implementation scenarios are outside the scope of the AgilePoint NX Product Documentation. For specific and/or advanced types of examples that may better meet your requirements, AgilePoint provides several resources:

  • AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
  • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
  • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.