Query Procedure List

API Type

Web Services

Description

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

Syntax

public virtual WFAutomaticWorkItem[] QueryProcedureList(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 automatic work items.

Example

IWFWorkflowService svc = GetWorkflowService();

try
	{
    //WebMethod with sql query expression as argument.
    WFAny any = WFAny.Create(WFAutomaticWorkItem.WAITING);
    WFQueryExpr expr = new WFQueryExpr("STATUS", SQLExpr.EQ, any, true);
    WFAutomaticWorkItem[] result = svc.QueryProcedureList(expr);
    
    if (result != null)
        {
        // Iterating through the list of the automatic work item
        foreach (WFAutomaticWorkItem re in result)
            {
            Console.WriteLine("ActivityInstID-->" +
                re.ActivityInstID);
            Console.WriteLine("ApplName-->" + re.ApplName);
            Console.WriteLine("ProcInstID-->" + re.ProcInstID);
            Console.WriteLine("CreatedDate-->" + re.CreatedDate);
            }
        }
	}

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

Supported Versions

3.2.0.4 and higher