pp108 : GetHumanTasks

GetHumanTasks

 


The GetHumanTasks SOAP method is used to retrieve the Tasks. This method is a part of the Method Set Notification 1.0 interface with the namespace http://schemas.cordys.com/notification/workflow/1.0.

SOAP Request

<GetHumanTasks xmlns="http://schemas.cordys.com/notification/workflow/1.0">
	<Query xmlns="http://schemas.cordys.com/cql/1.0">
		<Select>
			<QueryableObject>TASK_INSTANCE</QueryableObject>
			<Field>TaskId</Field>
			<Field>ParentTaskId</Field>
			<Field>SourceInstanceId</Field>
			<Field>State</Field>
			<Field>ProcessName</Field>
			<Field>Activity</Field>
			<Field>Priority</Field>
			<Field>Target</Field>
			<Field>Sender</Field>
			<Field>SourceType</Field>
			<Field>Assignee</Field>
			<Field>CompletedByUser</Field>
			<Field>DelegatedToUser</Field>
			<Field>DeliveryDate</Field>
			<Field>StartDate</Field>
			<Field>DueDate</Field>
			<Field>StartedOn</Field>
			<Field>CompletionDate</Field>
			<Field>IsPriorityFixed</Field>
			<Field>UITaskId</Field>
			<Field>TaskIdentifier:3417EB96-7E46-11E5-E007-7EF97B8E7F67</Field>
		</Select>
		<Filters>
			<And>
				<EQ field="SHOW_BUSINESS_ATTRIBUTES">
					<Value>true</Value>
				</EQ>
				<EQ field="SHOW_NON_WORKABLE_ITEMS">
					<Value>false</Value>
				</EQ>
				<EQ field="RETURN_TASK_DATA">
					<Value>false</Value>
				</EQ>
				<LE field="StartDate">
					<Value>2015-06-04T11:09:32.32</Value>
				</LE>
				<EQ field="Target">
					<Value>user:cn=testUser,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=opentext.net</Value>
				</EQ>
				<EQ field="TaskIdentifier.Input1">
					<Value>200</Value>
				</EQ>
			</And>
		</Filters>
		<OrderBy>
			<Property direction="asc">TaskIdentifier.Input1</Property>
		</OrderBy>
		<Cursor position="0" numRows="100" maxRows="100"/>
	</Query>
</GetHumanTasks>
Request Parameters

Parameter

Description

Mandatory

Accepted Input Values

QueryableObject

Name of the database object that is to be queried

Yes

TASK_INSTANCE

Field

Functional name of the database column, whose details are to be queried

Atleast One

  • TaskId
  • ParentTaskId
  • SourceInstanceId
  • State
  • ProcessName
  • Activity
  • ActivityId
  • Priority
  • Target
  • Sender
  • SourceType
  • Assignee
  • CompletedByUser
  • DelegatedToUser
  • DeliveryDate
  • StartDate
  • DueDate
  • StartedOn
  • CompletionDate
  • IsPriorityFixed
  • UITaskId
  • TimeTaken

Filters

Constraints to filter the response

No

  • And
  • Or
  • EQ
  • NQ
  • LT
  • LE
  • GT
  • GE
  • In
  • Like
  • Between
  • IsNull
  • Not (can be nested and repeated)

OrderBy

Fields on which the results must be ordered

No

One or more of the Property elements. The ordering sequence depends upon the sequence of the Property elements.

Cursor

Information on the set of results to be returned

No

 
SHOW_NON_WORKABLE_ITEMS
Contains a boolean value. Returns tasks of non workable nature. No

The possible values are:

  • True - Returns all workable items and the non-workable items that are in COMPLETE, OBSOLETE, or SUSPEND state.
  • False - Returns only workable items that are in CREATED, ASSIGNED, INPROGRESS, or PAUSED state. The default value is False.
SHOW_BUSINESS_ATTRIBUTES
Contains Business attributes of the Tasks returned. No

The possible values are:

  • True - Returns business attributes
  • False - Does not return business attributes. The default value is False.
RETURN_TASK_DATA
To decide if the task data is required No

The possible values are:

  • True - To display the task data
  • False - Not to display the task data. The default value is False.

 

  • We can provide only one 'Target' in the request and only 'EQ' filter is supported for this. Value should be like 'TargetType:Target'.
    Eg's:
    i. role:cn=testRole,cn=organizational roles,o=system,cn=cordys,cn=defaultInst,o=opentext.net
    ii. user:cn=testUser,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=opentext.net
    iii. team:3417EB96-7E46-11E4-FF0C-97DB975710EC
    iv.worklist:3417EB96-7E46-11E4-FF0C-97DB9754F0EC
  • If the 'Target' is not provided, tasks across all the targets for that user will be retrieved.
  • If you want to query the tasks based on 'TaskIdentifier id', you must prefix the GUID value in 'Field' with 'TaskIdentifier'. For instance, (TaskIdentifier:3417EB96-7E46-11E5-E007-7EF97B8E7F67)
  • In the Filters or OrderBy clause, you must provide the field name as 'TaskIdentifier.BusinessAttribute Name' as shown in the sample request above.

  <GetHumanTasksResponse xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/notification/workflow/1.0">
	<tuple>
      <old>
        <NOTF_TASK_INSTANCE>
          <TaskId>3417EB96-7E46-11E5-E09F-7DA5066B7F67</TaskId>
          <SourceInstanceId>3417EB96-7E46-11E5-E09F-7DA5066B1F67</SourceInstanceId>
          <State>INPROGRESS</State>
          <ProcessName>BPMS/testBpm</ProcessName>
          <Activity>ui</Activity>
          <Priority>3</Priority>
          <Sender displayName="saiu" phone1="" phone2="" email="">cn=testUser,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=opentext.net</Sender>
          <SourceType>BPM</SourceType>
          <Assignee displayName="saiu" phone1="" phone2="" email="">cn=testUser,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=opentext.net</Assignee>
          <CompletedByUser xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" null="true" xsi:nil="true" />
          <DelegatedToUser xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" null="true" xsi:nil="true" />
          <DeliveryDate>2015-05-28T05:39:40.0</DeliveryDate>
          <StartDate>2015-05-28T05:39:40.0</StartDate>
          <DueDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" null="true" xsi:nil="true" />
          <StartedOn>2015-05-28T10:20:13.0</StartedOn>
          <CompletionDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" null="true" xsi:nil="true" />
          <IsPriorityFixed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" null="true" xsi:nil="true" />
          <UITaskId>3417EB96-7E46-11E5-E007-7EF97B8D7F67</UITaskId>
          <Target type="role">cn=Role1,cn=organizational roles,o=system,cn=cordys,cn=defaultInst,o=opentext.net</Target>
          <BusinessAttributes>
            <Attribute name="Button2" xpath="//proc:forminputdata/proc:freeformcontrols/proc:button2" datatype="STRING" />
            <Attribute name="Button3" xpath="//proc:forminputdata/proc:freeformcontrols/proc:button3" datatype="STRING" />
            <Attribute name="Button1" xpath="//proc:forminputdata/proc:freeformcontrols/proc:button1" datatype="STRING" />
          </BusinessAttributes>
          <TaskData>
            <ApplicationData>
              <proc:forminputdata xmlns="http://schemas.cordys.com/1.0/xforms/processapi" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:proc="http://schemas.cordys.com/1.0/xforms/processapi">
                <proc:freeformcontrols>
                  <proc:button1 display_name="Button1" />
                  <proc:button2 display_name="Button2" />
                  <proc:button3 display_name="Button3" />
                </proc:freeformcontrols>
              </proc:forminputdata>
            </ApplicationData>
          </TaskData>
        </NOTF_TASK_INSTANCE>
      </old>
    </tuple>
	<cursor numRows="100"/>
</GetHumanTasksResponse>
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

Target

Type of target to which the task is assigned.

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

Sender

Contains the DN of the user who sent the task

StartedOn

Contains the date when the task is started