Gets the list of tasks using specified filters.

Syntax

Visual Basic (declaration)
Public Function GetTasks( _ 
ByVal AuthenticationTicket as String, _ ByVal xmlcriteria as String, _ ByVal SortBy as String, _ ByVal AscendingOrder as bool) as XmlNode

C# (declaration)
public XmlNode GetTasks( 
string AuthenticationTicket, string xmlcriteria, string SortBy, bool AscendingOrder)

Parameters

AuthenticationTicket
    string infoRouter ticket
xmlcriteria
    string The xml structure of the criterias. To Details of this parameter see the remarks section.
SortBy
    string Possible Sort Options : [0] DefaultSort, [1] DocumentID, [2] Instruction, [3] DateAssigned, [4] RecurringEndBy, [5] DueDate, [6] ReminderDate, [7] Priority, [8] TaskStatus, [9] FinishDate, [10] Assignee, [11] AssignedBy, [12] WorkflowName, [13] DocTypeName, [14] DocumentLibrary, [15] DocumentName, [16] SuperVisor
AscendingOrder
    bool Boolean value can be true or false

Return Value

returns xml fragment.
<response success="true" error="" ranksorted="False">
if success attribute is "true", the tasks has been returned successfully.
if success attribute is "false", the error attribute indicates the encountered error.

Remarks


The Criteria XML fragment should be as described below.

<CRITERIA>
<ITEM NAME="TASKCOMPLETIONSTATUS" VALUE="" />
<ITEM NAME="PRIORITY" VALUE="" />
<ITEM NAME="STARTDATE" VALUE="" />
<ITEM NAME="ENDDATE" VALUE="" />
<ITEM NAME="LIBRARYID" VALUE="" />
<ITEM NAME="ASSIGNEDBYID" VALUE="" />
<ITEM NAME="ASSIGNEEID" VALUE="" />
<ITEM NAME="SUPERVISORID" VALUE="" />
<ITEM NAME="DOCUMENTTYPE" VALUE="" />
<ITEM NAME="WORKFLOWDEFID" VALUE="" />
<ITEM NAME="DOCUMENTID" VALUE="" />
<ITEM NAME="FLOWID" VALUE="" />
</CRITERIA>

criteria details

TASKCOMPLETIONSTATUS : Task Status
string value : either text value or number value accepted.
options:
NOCOMPLETIONSTATUS = 0
OVERDUE = 1
COMPLETED = 2
DUE = 3


PRIORITY : Task Priority
string value : either text value or number value accepted.
Options:
NOPRIORTYSETTING = 0
LOW = 1
NORMAL = 5
HIGH = 10
URGENT = 11

STARTDATE :Task Start date
DateTime value : send as universal format like "2009-11-02 18:22:11"

ENDDATE : Task End date
DateTime value : send as universal format like "2009-11-02 18:22:11"

LIBRARYID : ID of a document library
Integer value :

ASSIGNEDBYID : ID of a user
Integer value :

ASSIGNEEID : ID of a User
Integer Value

SUPERVISORID: ID of as User
Integer Value

DOCUMENTTYPE : Name of the document type
string value

WORKFLOWDEFID : ID of a workflow definition
Integer value

DOCUMENTID : ID of a document
Integer Value

FLOWID : ID of a Workflow
Integer value


criteria xml sample: The following xml criteria returns the tasks that are due to Aug 22, 2009 and assigned to the user who has 123 id.

<CRITERIA>
<ITEM NAME="TASKCOMPLETIONSTATUS" VALUE="DUE" />
<ITEM NAME="ENDDATE" VALUE="2009-08-22" />
<ITEM NAME="ASSIGNEEID" VALUE="123" />
</CRITERIA>


NOTE:
All listed tasks are filtered by default depends on caller user.(except SYSADMIN)
The caller user must be the assigner, assignee or the supervisor of the tasks.
The caller user can list all the tasks where they have library manager role.


See Also