Query Work List

API Type

Web Services

Description

Retrieves a list of manual work items that match a specified query expression.

Syntax

public virtual WFManualWorkItem[] QueryWorkList(WFQueryExpr expr)

Parameters

Name Description

expr

Definition:
Specifies the where clause of a SQL query expression.
Type
WFQueryExpr
Allowed Values:
A valid WFQueryExpr object.

Output

An array of WFManualWorkItem objects that contain the work item data.

Example

IWFWorkflowService svc = GetWorkflowService();
WFAny any = WFAny.Create(WFManualWorkItem.ASSIGNED);
WFQueryExpr expr = new WFQueryExpr("WF_MANUAL_WORKITEM.STATUS",
SQLExpr.EQ, any, true);

try
	{
    WFManualWorkItem[] workItems = svc.QueryWorkList(expr);
    
    // Iterating through the list of the ManualWorkItem
    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