Retrieve HCM Task Details
Note:
The client must know the endpoint URL for the HCM Tasks API because the BPM Tasks API does not provide an automated link to point to the URL.The REST client can expand the changesAttributes
child resource to
obtain details about underlying transaction data for all the Transaction
Framework-related tasks. The changedAttributes
collection contains information about all the attributes that changed
during the course of the transaction. It includes old and new values
as well as parent and child references which is useful if information
about hierarchical business objects is required.
For each supported task, a record is returned containing the identification key for back reference to BPM tasks. The response includes a link to the resource with additional information about each task. Depending on the type of task or transaction, the link can point to different resources such as HCM Absences API for absence requests, HCM Time API for time approvals and BPM Tasks API for alert notifications.
To retrieve the details of HCM tasks:
- Perform a GET operation on the HCM
tasks
resource using thefindByIdentificationKeys
finder. Provide comma-separated list of task identification keys as the finder parameter value. - Verify the changed attributes and the additional information links returned in the response for each task.
Example URL
The following is the format of the resource URL.
GET
/hcmRestApi/resources/11.13.18.05/tasks?finder=findByIdentificationKeys;IdentificationKeys="300100155148545,300100155148633,ALERT:300100161296970,ALERT:300100161297000,300100164583390,300100164583394,300100164599768"&expand=changedAttributes
Example Response
The following is an example of the response body in JSON format.
{
"items": [
{
"IdentificationKey": "300100155148545",
"ModuleIdentifier": "Change Manager",
"AdditionalInformation": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/publicWorkers/100000008153768",
"changedAttributes": [
{
"Object": "AssignmentSupervisor",
"ObjectId": "134266",
"ParentObject": "BaseWorkerWorkTerms",
"ParentObjectId": "955159008168202",
"ObjectLabel": "Manager",
"ParentObjectLabel": "Work Terms",
"AttributeLabel": "Manager Name",
"Attribute": "ManagerName",
"CurrentId": null,
"ProposedId": null,
"CurrentValue": "Anita ZHRAGBI-Aguilar",
"ProposedValue": "Shannon ZHRAGBI-Thompson"
},
...
],
"links": [
{
"rel": "external",
"href": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/publicWorkers/100000008153768",
"name": "AdditionalInformation",
"kind": "other"
}
]
},
{
"IdentificationKey": "300100155148633",
"ModuleIdentifier": "Global Absence Recording",
"AdditionalInformation": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/absences/300100155148633",
"changedAttributes": [],
"links": [
{
"rel": "external",
"href": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/absences/300100155148633",
"name": "AdditionalInformation",
"kind": "other"
}
]
},
{
"IdentificationKey": "ALERT:300100161296970",
"ModuleIdentifier": null,
"AdditionalInformation": "https://<host>:<port>/bpm/tasks?identificationKey= ALERT:300100161296970&payloadFlag=true",
"changedAttributes": [],
"links": [
{
"rel": "external",
"href": "https://<host>:<port>/bpm/tasks?identificationKey= ALERT:300100161296970&payloadFlag=true",
"name": "AdditionalInformation",
"kind": "other"
}
]
},
{
"IdentificationKey": "ALERT:300100161297000",
"ModuleIdentifier": null,
"AdditionalInformation": "https://<host>:<port>/bpm/tasks?identificationKey= ALERT:300100161297000&payloadFlag=true",
"changedAttributes": [],
"links": [
{
"rel": "external",
"href": "https://<host>:<port>/bpm/tasks?identificationKey= ALERT:300100161297000&payloadFlag=true",
"name": "AdditionalInformation",
"kind": "other"
}
]
},
{
"IdentificationKey": "300100164583390",
"ModuleIdentifier": "Global Absence Recording",
"AdditionalInformation": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/absences/300100164583390",
"changedAttributes": [],
"links": [
{
"rel": "external",
"href": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/absences/300100164583390",
"name": "AdditionalInformation",
"kind": "other"
}
]
},
{
"IdentificationKey": "300100164583394",
"ModuleIdentifier": "ManagePerson",
"AdditionalInformation": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/publicWorkers/100000008153770",
"changedAttributes": [
{
"Object": "BaseWorkerAssignment",
"ObjectId": "955159008168202",
"ParentObject": "BaseWorkerWorkTerms",
"ParentObjectId": "955159008168202",
"ObjectLabel": "Assignment",
"ParentObjectLabel": "Work Terms",
"AttributeLabel": "Middle Name",
"Attribute": "MiddleName",
"CurrentId": null,
"ProposedId": null,
"CurrentValue": "",
"ProposedValue": "Martin"}
],
"links": [
{
"rel": "external",
"href": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/publicWorkers/100000008153770",
"name": "AdditionalInformation",
"kind": "other"
}
]
},
{
"IdentificationKey": "300100164599768",
"ModuleIdentifier": "TimeCardApproval",
"AdditionalInformation": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/timeRecordGroups/300100164599768",
"changedAttributes": [],
"links": [
{
"rel": "external",
"href": "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/timeRecordGroups/300100164599768",
"name": "AdditionalInformation",
"kind": "other"
}
]
},
]
...
}