SearchHumanTasks |
This method is used to search human tasks based on criteria. This API can search human tasks across targets. This API can also search human tasks on task identifiers from more than one delivery models. SearchHumanTask is part of the the Method Set WS-HumanTask Execution 2.0 in the application package Cordys Notification.
SOAP Request
<SearchHumanTasks xmlns="http://schemas.cordys.com/notification/ws-humantask/execution/2.0"> <Variables> <Variable> <TaskIdentifier> <Name>PARAMETER</Name> <XPath>PARAMETER</XPath> <DataType>STRING | INTEGER | FLOAT | DATETIME | BOOLEAN</DataType> <Namespaces> <Namespace> <NamespaceURI>PARAMETER</NamespaceURI> <NamespacePrefix>PARAMETER</NamespacePrefix> </Namespace> </Namespaces> </TaskIdentifier> </Variable> <Variable> <Target> <Name>PARAMETER</Name> <Type>user | role | team | worklist</Type> <Dn>PARAMETER</Dn> <Id>PARAMETER</Id> </Target> </Variable> </Variables> <cursor maxRows="10" numRows="10" position="0"/> <Criteria> <Query/> <Parameters> <Parameter name="" type="" value="" variable=""/> </Parameters> </Criteria> <OrderBy/> </SearchHumanTasks>
Sample SOAP Request
<SearchHumanTasks xmlns="http://schemas.cordys.com/notification/ws-humantask/execution/2.0"> <Variables> <Variable> <Target> <Name>PMG</Name> <Type>worklist</Type> <Id>0024E89D-F70F-11E0-F50C-BBA4D25E992D</Id> </Target> </Variable> <Variable> <Target id="0024E89D-F70F-11E0-F50C-BBA4D25E992E" name="Workflow" type="team"> <Name>Workflow</Name> <Type>team</Type> <Id>0024E89D-F70F-11E0-F50C-BBA4D25E992E</Id> </Target> </Variable> <Variable> <TaskIdentifier> <Name>IncidentType</Name> <DataType>STRING</DataType> <XPath>//proc:forminputdata/proc:freeformcontrols/proc:IncidentType</XPath> <Namespaces> <Namespace> <Namespaceurl>http://schemas.cordys.com/1.0/xforms/processapi</Namespaceurl> <Namespaceprefix>proc</Namespaceprefix> </Namespace> </Namespaces> </TaskIdentifier> </Variable> <Variable> <TaskIdentifier datatype="STRING" name="Customer" xpath="//proc:forminputdata/proc:freeformcontrols/proc:Customer"> <Name>Customer</Name> <DataType>STRING</DataType> <XPath>//proc:forminputdata/proc:freeformcontrols/proc:Customer</XPath> <Namespaces> <Namespace> <Namespaceurl>http://schemas.cordys.com/1.0/xforms/processapi</Namespaceurl> <Namespaceprefix>proc</Namespaceprefix> </Namespace> </Namespaces> </TaskIdentifier> </Variable> </Variables> <cursor maxRows="10" numRows="10" position="0"/> <Criteria> <Query> (Task.Target=:PARAM1 OR Task.Target=:PARAM2) AND (IncidentType=:PARAM3) AND (Customer=:PARAM4 OR Customer=:PARAM5 OR Customer=:PARAM6) </Query> <Parameters> <Parameter name="PARAM1" type="Task.Target" variable="PMG"/> <Parameter name="PARAM2" type="Task.Target" variable="Workflow"/> <Parameter name="PARAM3" type="IncidentType" value="Enhancement"/> <Parameter name="PARAM4" type="Customer" value="Mercer"/> <Parameter name="PARAM5" type="Customer" value="KPN"/> <Parameter name="PARAM6" type="Customer" value="CSC"/> </Parameters> </Criteria> <OrderBy>Customer ASC, Task.DeliveryDate DESC</OrderBy> </SearchHumanTasks>
Request Parameters
Parameter |
Description |
Data Type |
Accepted Input Values |
---|---|---|---|
Variable\TaskIdentifier |
Contains the Definition of the Task Identifier on which you can search or order. |
|
|
Variable\TaskIdentifier\Name |
Name of the Task Identifier. This name can be referred in the Criteria, OrderBy, and Parameter fields for denoting this task identifier. |
String |
|
Variable\TaskIdentifier\XPath |
XPath of the Task Identifier. |
String |
|
Variable\TaskIdentifier\DataType |
Datatype of the associated Task Identifier. |
|
|
Variable\TaskIdentifier\Namespaces |
Contains the mapping of the Namespace to namespace prefix of the assocaited Task Identifier XPath. This element contains multiple Namespace nodes. Each node contains the NamespaceURI and the associated NamespacePrefix as shown in the sample above. |
|
|
Variable\Target |
Contains the definition of the Target (either user, role, team, or worklist) on which you can search or order. |
|
|
Variable\Target\Name |
Contains the name of the Target This name can be referred in the Criteria, OrderBy, and Parameter fields to denote this target. |
String |
|
Variable\Target\Type |
Contains the type of the Target. |
String |
|
Variable\Target\Dn |
This element contains the DN of the user or role. This element should be included only when the Type contains either user or role. For other values this will be ignored. |
String |
|
Variable\Target\Id |
This element contains the ID of the team or work list. This element should be included only when the Type field contains either team or work list. For other values this will be ignored. |
String |
|
cursor |
Number of rows that would be returned by the query. |
|
|
Criteria |
Contains the parametrized queries that are used to search the task.
|
String |
The following system attributes will be supported for search and sort:
|
Query |
Contains the query used to search the task. |
String |
|
Parameters |
Contains the set of parameters used to search the task. |
|
|
Parameter@name |
Name of the parameter used in the query. For example - Task.StartDate, Task.StartedOn, or Task Identifiers. |
String |
|
Paramter@type |
Type of the parameter used in the query. |
String |
|
Parameter@value |
Value of the parameter. For all paramters whose name is other than Task.Target, Task.Assignee, Task.Delegatee, and Task.Assignee, the value is given under this attribute. The values for these attributes are defined under the variable attribute. |
String |
|
Parameter@variable |
Name of the Variable which represents the value on which it is to be queried. This attribute is used for
|
String |
|
OrderBy |
Contains the order of arranging tasks in ascending or descending order based on the attributes. |
String |
All System attributes and Task Identifiers as defined in the request through Variable\TaskIdentifier definitions |
SOAP Response
<SearchHumanTasksResponse xmlns="http://schemas.cordys.com/notification/ws-humantask/execution/2.0"> <cursor id="-1" numRows="10"/> <tuple> <old> <Task> <TaskId>002170BA-2FEC-11E1-F384-6568B5A8DBA6</TaskId> <ProcessName/> <SourceType/> <SourceInstanceId/> <Assignee displayName="09fff207-0b36-49ac-af6d-bdf3613643f8" email="" phone1="" phone2="">cn=09fff207-0b36-49ac-af6d-bdf3613643f8,cn=organizational users, o=system,cn=cordys,cn=bop41cu7rb28,o=vanenburg.com</Assignee> <CompletedByUser/> <DelegatedToUser/> <DeliveryDate>2012-05-12T11:11:13.0</DeliveryDate> <StartDate>2012-05-12T11:11:12.0</StartDate> <CompletionDate/> <DueDate isExpired="false"/> <BusinessAttributes/> <StartedOn/> <State>ASSIGNED</State> <Priority>3</Priority> <Activity>82151295-edda-435e-8831-09cc7ba7e360</Activity> <Target type="user">cn=09fff207-0b36-49ac-af6d-bdf3613643f8, cn=organizational users,o=system,cn=cordys,cn=bop41cu7rb28,o=vanenburg.com</Target> <Targets> <Target type="user">cn=09fff207-0b36-49ac-af6d-bdf3613643f8, cn=organizational users,o=system,cn=cordys,cn=bop41cu7rb28,o=vanenburg.com</Target> </Targets> <Sender displayName="jdoe" email="" phone1="" phone2="">cn=jdoe,cn=organizational users, o=system,cn=cordys,cn=bop41cu7rb28,o=vanenburg.com</Sender> <ParentTaskId>002170BA-2FEC-11E1-F384-6568B5A8DBA6</ParentTaskId> <TimeTaken>0</TimeTaken> </Task> </old> </tuple> </SearchHumanTasksResponse>
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 which 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 date on which the task is actually completed. |
Targets |
Type of target where the task should be sent. |
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 should 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:
|
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 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 actually started. |