GetTasks |
This method is used to retrieve all the tasks based on certain criteria.
SOAP Request
<GetTasks xmlns="http://schemas.cordys.com/notification/workflow/1.0">
<TaskIdentifiers>
<TaskIdentifierType id="15d5a9e3-f7c3-4a44-99cb-7146f478616c" name="SalesOrder"/>
</TaskIdentifiers>
<Criteria>
<Query>(Task.StartDate IS NULL OR Task.StartDate &lt;=:sdate ) AND (Task.State =:tstate AND SalesOrder.Id like :id)
</Query>
<Parameters>
<Parameter name="tstate" type="Task.State" value="CREATED"/>
<Parameter name="id" type="SalesOrder.Id" value="%1%"/>
<Parameter name="sdate" type="Task.StartDate" value="2008-12-31T08:25:45.45"/>
</Parameters>
</Criteria>
<OrderBy>SalesOrder.Id</OrderBy>
<AssignedBy>cn=npraveen,cn=organizational users,o=system,cn=cordys,cn=signfp1,o=vanenburg.com</AssignedBy>
<Target type="worklist">d9a48178-592c-453a-8d69-d7e13ca2bd78</Target>
<ShowNonWorkableItems>false</ShowNonWorkableItems>
<cursor id="" maxRows="" numRows="" position=""/>
<ReturnTaskData>true</ReturnTaskData>
</GetTasks>
Request Parameters
Parameter |
Description |
Data Type |
Accepted Input Values |
|---|---|---|---|
TaskIdentifierId Type |
ID of the task identifier type |
The possible values are:
|
|
AssignedBy |
Assignee who assigned the task |
DN of the assignee |
|
ReturnTaskData |
To decide if the task data is required |
The possible values are:
|
|
Cursor |
Number of rows returned by the query |
||
Criteria |
Contains the parameterized queries that are used to search the task |
It can be based on System attributes like:
or Business Attributes like:
The System attributes are prefixed by Task and Business attributes are prefixed by the name of the task identifier type. For example:
|
|
Query |
Contains the query used to search the task |
||
Parameters |
Contains the set of parameters used to search the task |
|
|
OrderBy |
Contains the way of arranging tasks in ascending or descending order based on the attributes |
For example:
|
|
Target |
Contains the type of target from which the tasks must be retrieved |
type - This is an optional tag.
|
|
ShowNonWorkableItems |
Contains a boolean value. Returns tasks of non workable nature |
Boolean |
The possible values are:
|
SOAP Response
<GetTasksResponse
xmlns="http://schemas.cordys.com/notification/workflow/1.0"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<cursor
id="-1"/>
<tuple>
<old>
<Task>
<TaskId>005056C0-0008-11E0-EE96-BDEF09C61FD0</TaskId>
<ProcessName>BPM/BPM 001</ProcessName>
<SourceType>BPM</SourceType>
<SourceInstanceId>005056C0-0008-11E0-EE96-BDEF09C5BFD0</SourceInstanceId>
<Assignee
displayName="npraveen" email="" phone1=""
phone2="">cn=npraveen,cn=organizational users,o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Assignee>
<CompletedByUser/>
<DelegatedToUser/>
<DeliveryDate>2011-05-02T12:16:00.087</DeliveryDate>
<StartDate>2011-05-02T12:15:59.307</StartDate>
<CompletionDate/>
<DueDate
isExpired="false"/>
<StartedOn/>
<State>ASSIGNED</State>
<Priority>3</Priority>
<Activity>Task1</Activity>
<Target
type="user">cn=npraveen,cn=organizational users,o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Target>
<Sender
displayName="npraveen" email="" phone1=""
phone2="">cn=npraveen,cn=organizational users,o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Sender>
<ParentTaskId>005056C0-0008-11E0-EE96-BDEF09C61FD0</ParentTaskId>
</Task>
</old>
</tuple>
<tuple>
<old>
<Task>
<TaskId>005056C0-0008-11E0-EE96-BDEF09C7BFD0</TaskId>
<ProcessName>BPM/BPM 001</ProcessName>
<SourceType>BPM</SourceType>
<SourceInstanceId>005056C0-0008-11E0-EE96-BDEF09C75FD0</SourceInstanceId>
<Assignee
displayName="npraveen" email="" phone1=""
phone2="">cn=npraveen,cn=organizational users,o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Assignee>
<CompletedByUser/>
<DelegatedToUser/>
<DeliveryDate>2011-05-02T12:16:00.087</DeliveryDate>
<StartDate>2011-05-02T12:15:59.883</StartDate>
<CompletionDate/>
<DueDate
isExpired="false"/>
<StartedOn/>
<State>ASSIGNED</State>
<Priority>3</Priority>
<Activity>Task1</Activity>
<Target
type="user">cn=npraveen,cn=organizational users,o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Target>
<Sender
displayName="npraveen" email="" phone1="" phone2="">cn=npraveen,cn=organizational users,o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Sender>
<ParentTaskId>005056C0-0008-11E0-EE96-BDEF09C7BFD0</ParentTaskId>
</Task>
</old>
</tuple>
</GetTasksResponse>
Response Parameters
Parameter |
Description |
|---|---|
TaskId |
Contains the unique task ID |
ProcessName |
Contains the name of the Business Process that assigned the task |
SourceType |
Source from where the task is triggered |
SourceInstanceId |
Instance ID of the source that triggered the task |
CompletedByUser |
Contains the DN of the user who completes the task |
DelegatedToUser |
Contains the DN of the user to whom the task is delegated |
CompletionDate |
Contains the date when the task is completed |
Targets |
Type of target where the task must be sent |
ParentTaskId |
This ID is used to group all the tasks, which are assigned to same role with All linked users should execute task option enabled in the Business Process properties. |
Assignee |
Contains the DN of the user to whom the task is assigned |
StartDate |
Contains the date when the task can be started |
DueDate isExpired |
Contains the date when the task must be completed. When isExpired is true, the due date is already past. |
DeliveryDate |
Contains the date when the task is completed |
State |
Contains the current state of the task. For example: Assigned, InProgress, and so on. |
Priority |
Contains the priority that is set on the task |
Activity |
Contains the name of the activity specified in the business process |
WorklistId |
Contains the ID of the work list from which the tasks are retrieved. Contains the ID of the role or user, if the type was set to role or user. |
Sender |
Contains the DN of the user who sent the task |
StartedOn |
Contains the date when the task is started |