pp108 : GetTask

GetTask

 

This method is used to retrieve the task details based on the task ID.

SOAP Request

<GetTask xmlns="http://schemas.cordys.com/notification/workflow/1.0">
    <TaskId>005056C0-0008-11E0-EE96-BDEF09C61FD0</TaskId>
    <Target type="user">cn=JDoe,cn=organizational users,o=system,
           cn=cordys,cn=signfp1,o=vanenburg.com</Target>
    <RetrievePossibleActions>false</RetrievePossibleActions>
	<ReturnTaskData>true</ReturnTaskData>
</GetTask>
Request Parameters

Parameter

Description

Required

Accepted Input Values

TaskId

Unique identifier of the task to be retrieved

Required

This ID can be retrieved using the GetTasks API.

Target

Type of target where the task must be sent

Optional

  • user - Provides the DN of the user. The userDn can be obtained from the GetTargetsByType API.
  • role - Provides the DN of the role. The roleDn can be obtained from the GetTargetsByType API.
  • worklist - Provides the ID of the worklist(). The worklistId can be obtained from the GetTargetsByType API.
  • team - Provides the ID of the team. The TeamId can be obtained from the GetTargetsByType API.

RetrievePossibleActions

Retrieves the actions that are possible for the task

Optional

The possible values are:

  • true - Retrieves the possible actions
  • false - Does not retrieve any value. This is the default value.
ReturnTaskData  To decide task data is required or not  Optional

The possible values are:

  • true - To display the task data. This is the default value.
  • False - Not to display the task data

SOAP Response

<GetTaskResponse
    xmlns="http://schemas.cordys.com/notification/workflow/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <tuple>
        <old>
            <Task>
                <ProcessInstanceId>005056C0-0008-11E0-EE96-BDEF09C5BFD0</ProcessInstanceId>
                <ProcessName>BPM/BPM 001</ProcessName>
                <TaskId>005056C0-0008-11E0-EE96-BDEF09C61FD0</TaskId>
                <ParentTaskId>005056C0-0008-11E0-EE96-BDEF09C61FD0</ParentTaskId>
                <State>ASSIGNED</State>
                <Activity>Task1</Activity>
                <Sender displayName="JDoe" email="" phone1="" phone2="">cn=JDoe,cn=organizational users,
o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Sender>
                <Assignee displayName="JDoe" email="" phone1="" phone2="">cn=JDoe,cn=organizational users,
o=system,cn=cordys,cn=signfp1,o=vanenburg.com</Assignee>
                <CompletedByUser/>
                <DelegatedToUser/>
                <TaskData>
                    <ApplicationData>
                        <forminputdata
                            xmlns="http://schemas.cordys.com/1.0/xforms/processapi" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
                            <freeformcontrols xmlns="http://schemas.cordys.com/1.0/xforms/processapi">
                                <input1 display_name="Input1" xmlns="http://schemas.cordys.com/1.0/xforms/processapi"/>
                                <input2 display_name="Input2" xmlns="http://schemas.cordys.com/1.0/xforms/processapi"/>
                                <input3 display_name="Input3" xmlns="http://schemas.cordys.com/1.0/xforms/processapi"/>
                            </freeformcontrols>
                        </forminputdata>
                    </ApplicationData>
                    <CustomData/>
                    <Annotation/>
                </TaskData>
                <LoggerContext>
                    <Logger
                        xmlns="http://schemas.cordys.com/General/1.0/" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
                        <DC name="initiator">BPM Modeler</DC>
                        <DC name="hopCount">1</DC>
                        <DC name="correlationID">005056C0-0008-11E0-EE96-BAAE09665FD0</DC>
                        <DC name="process">BPM/BPM 001</DC>
                        <DC name="instance">005056C0-0008-11E0-EE96-BDEF09C5BFD0</DC>
                    </Logger>
                </LoggerContext>
                <DeliveryDate>2011-05-02T12:16:00.087</DeliveryDate>
                <StartDate>2011-05-02T12:15:59.307</StartDate>
                <DueDate isExpired="false"/>
                <StartedOn/>
                <CompletionDate/>
                <IsPriorityFixed>0</IsPriorityFixed>
                <Priority>3</Priority>
                <ParentQueue/>
                <UITaskId islegacy="false">005056C0-0008-11E0-EE96-A075026C3FD0</UITaskId>
                <ActivityId>o_2</ActivityId>
                <Component>BPM</Component>
                <CallBackInfo>
                    <ModelName
                        xmlns="http://schemas.cordys.com/notification/workflow/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">BPM/BPM 001</ModelName>
                    <InstanceId
                        xmlns="http://schemas.cordys.com/notification/workflow/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">005056C0-0008-11E0-EE96-BDEF09C5BFD0
</InstanceId>
                    <ActivityId iterationCount="1"
                        xmlns="http://schemas.cordys.com/notification/workflow/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">o_2</ActivityId>
                    <ActivityName
                        xmlns="http://schemas.cordys.com/notification/workflow/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">Task1</ActivityName>
                    <ParentSourceInstanceId type="BPM"
                        xmlns="http://schemas.cordys.com/notification/workflow/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">0</ParentSourceInstanceId>
                    <RootInstanceId type="PROCESS"
                        xmlns="http://schemas.cordys.com/notification/workflow/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">005056C0-0008-11E0-EE96-BDEF09C5BFD0
</RootInstanceId>
                </CallBackInfo>
                <Targets>
                    <Target type="user">cn=JDoe,cn=organizational users,o=system,
cn=cordys,cn=signfp1,o=vanenburg.com</Target>
                </Targets>
                <url>/cordys/Tasks/Task1.caf</url>
            </Task>
        </old>
    </tuple>
</GetTaskResponse>
Response Parameters

Parameter

Required

Description

TaskId

 

Contains the unique identifier of the task

ParentTaskId

 

This ID is used to group all the tasks which are assigned to the same role with the All linked users should execute task option enabled in the Activity Properties.

Component

 

Component from where the task has been triggered

ActivityId

 

The ID of the activity from which the task has been raised

CallBackInfo

Internal

Information about the caller, that is, BPM or Case

Targets

 

Type of target where the task is sent

ProcessInstanceId

 

Contains the unique identifier of the source that created the task

State

 

Contains the current state of the task

ProcessName

 

Contains the name of the source that created the task

Activity

 

Contains the subject of the task

Sender

 

Contains the DN of the sender of the task. The attributes are:

  • displayName - Displays name of the user as mentioned in the user manager or as it is in the LDAP
  • phone1 - Phone number as mentioned in the contact details while creating a user
  • phone2 - Phone number as mentioned in the contact details while creating a user
  • email - Email ID as mentioned in the contact details while creating a user

Assignee

 

Contains the DN of the assignee, who claims the task or to whom the task is assigned by the manager. The attributes are:

  • displayName - Displays name of the user as mentioned in the user manager or as it is in the LDAP
  • phone1 - Phone number as mentioned in the contact details while creating a user
  • phone2 - Phone number as mentioned in the contact details while creating a user
  • email - Email ID as mentioned in the contact details while creating a user

CompletedByUser

 

Contains the DN of the user who completes the task

DelegatedToUser

 

Contains the DN of the user to whom the task is delegated

Priority

 

Contains the priority set on the task. It is set between 0 and 5.

  • 0 - Denotes lowest priority
  • 5 - Denotes highest priority

TaskData

 

Contains Application Data and Custom Data

ApplicationData

 

Contains the data the task has to perform in the XML format

CustomData

 

Contains additional information about the task in the XML format

StartDate

 

Contains the date on which the task is supposed to start

StartedOn

 

Contains the date on which task has started

DueDate isExpired

 

Contains the date on which the task is due. When isExpired is true, the due date is already past.

LoggerContext

 

Logger context refers to the detailed information about the context of an application and is propagated across all the activities or transactions involved in that application

DeliveryDate

 

Contains the date on which the task is created

CompletionDate

 

Contains the date on which the task is completed

IsPriorityFixed

 

Contains the state of priority

Note: If 1, the priority cannot be changed.

ParentQueue

 

Contains the work list ID of the parent work list. While transferring the tasks to a different work list, the work list from which the task is transferred, is referred as the parent queue.

UITaskId

 

Contains the unique identifier of the application

url

 

Contains the URL of the application or the user interface that needs to be opened

Attachments: