REST interface for federated IBM BPM resources - Task Instance History Resource - GET Method

Use this method to retrieve the history of a human task instance.

Sample method invocation

GET /rest/bpm/federated/htm/v1/task/{tkiid}/history?systemID={string}[&newEventType={boolean}]

Parameters

Required Federation Parameter
NameValue TypeDescription
systemID string ID of the BPEL runtime system hosting the resource.
Optional Parameters
NameValue TypeDescription
newEventType boolean
Return new enumeration values in the event type property.
ValueDescription
true
Return new enumeration values in the event type property.
false (default)
Do not return new enumeration values in the event type property.

Request Content

None

Response Content

Task instance history log.

The default content-type is application/json.

MIME Type: application/json

If the parameter newEventType is omitted or set to false then the following data is returned.


Schema
{  "description": "Task History Log", 
   "type": "object",
   "properties":
   {  "tkiid": {"type": "string"},
      "items":
      [
         {  "escalationID": {"type": "string", "optional": true,
               "description": "ID of an escalation instance."
            },
            "event": {"type": "string", 
               "description": "Event type.",
               "enum":
               [
                  "EscalationCustomPropertySet",     
                  "EscalationFired",                 
                  "EscalationStarted",               
                  "EscalationWorkItemCreated",       
                  "EscalationWorkItemDeleted",       
                  "EscalationWorkItemRefreshed",     
                  "EscalationWorkItemTransferred",   
                  "SubTasksCompleted",               
                  "TaskClaimCancelled",              
                  "TaskClaimed",                     
                  "TaskCompleted",                   
                  "TaskCompletedWithFollowOn",       
                  "TaskCreated",                     
                  "TaskCustomPropertySet",           
                  "TaskDeleted",                     
                  "TaskExpired",                     
                  "TaskFailed",                      
                  "TaskFaultMessageUpdated",         
                  "TaskInputMessageUpdated",         
                  "TaskOutputMessageUpdated",        
                  "TaskRestarted",                   
                  "TaskResumed",                     
                  "TaskStarted",                     
                  "TaskSuspended",                   
                  "TaskTemplateInstalled",           
                  "TaskTemplateUninstalled",         
                  "TaskTerminated",                  
                  "TaskUpdated",                     
                  "TaskWaitingForSubTask",           
                  "TaskWorkItemCreated",             
                  "TaskWorkItemDeleted",             
                  "TaskWorkItemRefreshed",           
                  "TaskWorkItemTransferred"         
               ]
            },    
            "fromID": {"type": "string", "optional": true,
               "description": "ID of the user or group whose work item has been transferred to the to-user, or whose workitem has been deleted."
            },
            "idKind": {"type": "string", "optional": true, 
               "description": "Work item authorization type.",
               "enum":
               [
                  "WORK_ITEM_KIND_EVERYBODY",
                  "WORK_ITEM_KIND_GROUP",
                  "WORK_ITEM_KIND_USER"
               ]
            },    
            "parentID": {"type": "string", "optional": true,
               "description": "ID of a parent task."
            },
            "principal": {"type": "string",
               "description": "Name of principal who triggered this event."
            },
            "reason": {"type": "string", "optional": true, 
               "description": "Work item reason.",
               "enum":
               [
                  "REASON_ADMINISTRATOR",
                  "REASON_EDITOR",
                  "REASON_ESCALATION_RECEIVER",
                  "REASON_MAX",
                  "REASON_NONE",
                  "REASON_ORIGINATOR",
                  "REASON_OWNER",
                  "REASON_POTENTIAL_INSTANCE_CREATOR",
                  "REASON_POTENTIAL_OWNER",
                  "REASON_POTENTIAL_SENDER",
                  "REASON_POTENTIAL_STARTER",
                  "REASON_READER",
                  "REASON_STARTER",
                  "REASON_STATE_MACHINE_END",
                  "REASON_STATE_MACHINE_EVENT_AVAILABLE",
                  "REASON_STATE_MACHINE_START"
               ]
            },    
            "relatedTime": {"type": "string", "optional": true, "format": "date-time",
               "description": "Time when a related event will occur, e.g., an expiration."
            },
            "timeStamp": {"type": "string", "format": "date-time",
               "description": "Time when the event occurred."
            },
            "toID": {"type": "string", "optional": true,
               "description": "ID of the user or group a work item has been created for."
            }
         }
      ]
   }
}

MIME Type: application/json

If the parameter newEventType is set to true then the following data is returned.


Schema
{  "description": "Task History Log", 
   "type": "object",
   "properties":
   {  "tkiid": {"type": "string"},
      "items":
      [
         {  "escalationID": {"type": "string", "optional": true,
               "description": "ID of an escalation instance."
            },
            "event": {"type": "string", 
               "description": "Event type.",
               "enum":
               [
                  "EVENT_ESCALATION_CUSTOMPROPERTY_SET",
                  "EVENT_ESCALATION_FIRED",
                  "EVENT_ESCALATION_STARTED",
                  "EVENT_ESCALATION_UPDATED",
                  "EVENT_ESCALATION_WORKITEM_CREATED",
                  "EVENT_ESCALATION_WORKITEM_DELETED",
                  "EVENT_ESCALATION_WORKITEM_REFRESHED",
                  "EVENT_ESCALATION_WORKITEM_TRANSFERRED",
                  "EVENT_TASK_CLAIM_CANCELLED",
                  "EVENT_TASK_CLAIMED",
                  "EVENT_TASK_COMPLETED",
                  "EVENT_TASK_COMPLETED_WITH_FOLLOW_ON_TASK",
                  "EVENT_TASK_CREATED",
                  "EVENT_TASK_CUSTOMPROPERTY_SET",
                  "EVENT_TASK_DELETED",
                  "EVENT_TASK_EXPIRED",
                  "EVENT_TASK_FAILED",
                  "EVENT_TASK_FAULT_MESSAGE_UPDATED",
                  "EVENT_TASK_INPUT_MESSAGE_UPDATED",
                  "EVENT_TASK_OUTPUT_MESSAGE_UPDATED",
                  "EVENT_TASK_RESTARTED",
                  "EVENT_TASK_RESUMED",
                  "EVENT_TASK_STARTED",
                  "EVENT_TASK_SUBTASKS_COMPLETED",
                  "EVENT_TASK_SUSPENDED",
                  "EVENT_TASK_TEMPLATE_INSTALLED",
                  "EVENT_TASK_TEMPLATE_UNINSTALLED",
                  "EVENT_TASK_TERMINATED",
                  "EVENT_TASK_UPDATED",
                  "EVENT_TASK_WAITING_FOR_SUBTASK",
                  "EVENT_TASK_WORKITEM_CREATED",
                  "EVENT_TASK_WORKITEM_DELETED",
                  "EVENT_TASK_WORKITEM_REFRESHED",
                  "EVENT_TASK_WORKITEM_TRANSFERRED"
               ]
            },    
            "fromID": {"type": "string", "optional": true,
               "description": "ID of the user or group whose work item has been transferred to the to-user, or whose workitem has been deleted."
            },
            "idKind": {"type": "string", "optional": true, 
               "description": "Work item authorization type.",
               "enum":
               [
                  "WORK_ITEM_KIND_EVERYBODY",
                  "WORK_ITEM_KIND_GROUP",
                  "WORK_ITEM_KIND_USER"
               ]
            },    
            "parentID": {"type": "string", "optional": true,
               "description": "ID of a parent task."
            },
            "principal": {"type": "string",
               "description": "Name of principal who triggered this event."
            },
            "reason": {"type": "string", "optional": true, 
               "description": "Work item reason.",
               "enum":
               [
                  "REASON_ADMINISTRATOR",
                  "REASON_EDITOR",
                  "REASON_ESCALATION_RECEIVER",
                  "REASON_MAX",
                  "REASON_NONE",
                  "REASON_ORIGINATOR",
                  "REASON_OWNER",
                  "REASON_POTENTIAL_INSTANCE_CREATOR",
                  "REASON_POTENTIAL_OWNER",
                  "REASON_POTENTIAL_SENDER",
                  "REASON_POTENTIAL_STARTER",
                  "REASON_READER",
                  "REASON_STARTER",
                  "REASON_STATE_MACHINE_END",
                  "REASON_STATE_MACHINE_EVENT_AVAILABLE",
                  "REASON_STATE_MACHINE_START"
               ]
            },    
            "relatedTime": {"type": "string", "optional": true, "format": "date-time",
               "description": "Time when a related event will occur, e.g., an expiration."
            },
            "timeStamp": {"type": "string", "format": "date-time",
               "description": "Time when the event occurred."
            },
            "toID": {"type": "string", "optional": true,
               "description": "ID of the user or group a work item has been created for."
            }
         }
      ]
   }
}

Error Response Content

Detailed error information.

The default content-type is application/json.

MIME Type: application/json


Schema
{  "description": "Error Response", 
   "type": "object",
   "properties":
   {  "federationResult":
      [
         {  "systemID": {"type": "string",
               "description": "ID of the individual system the request was sent to."
            },
            "statusCode": {"type": "integer",
               "description": "HTTP Status Code returned from this system."
            },
            "errorNumber": {"type": "string", "optional": true,
               "description": "Message ID of the exception."
            },
            "errorMessage": {"type": "string", "optional": true,
               "description": "Message text of the exception."
            },
            "errorMessageParameters": {"type": ["string"], "optional": true,
               "description": "Message text parameters of the exception."
            },
            "programmersDetails": {"type": "object", "optional": true,
               "description": "Additional, exception details, for example, a stack trace."
            },
            "status": {"type": "string", "optional": true,
               "description": "Status of the request."
            },
            "exceptionType": {"type": "string", "optional": true,
               "description": "Type of the exception."
            }      
         }
      ], 
      "errorNumber": {"type": "string",
         "description": "Message ID of the exception."
      },
      "errorMessage": {"type": "string",
         "description": "Message text of the exception."
      },
      "errorMessageParameters": {"type": ["string"], "optional": true,
         "description": "Message text parameters of the exception."
      },
      "programmersDetails": {"type": "object", "optional": true,
         "description": "Additional, exception details, for example, a stack trace."
      },
      "status": {"type": "string", "optional": true,
         "description": "Status of the request."
      },
      "exceptionType": {"type": "string", "optional": true,
         "description": "Type of the exception."
      }      
   }
} 

Status codes

The method returns one of the following status codes:
CodeDescription
200 OKSuccess completion.
400 Bad RequestThe parameters are not valid or they are missing.
401 UnauthorizedThe caller is not authorized for this request.
404 Not Found
The task does not exist or the task history is not enabled.
406 Not AcceptableThe requested content type or content encoding is not supported.
500 Internal Server ErrorA severe problem has occurred. Programmer's details are provided.
503 Service UnavailableThe federated request could not be delivered to individual federation targets.
504 Gateway TimeoutThe federated response has partial content because of missing individual responses.

Available since

7.5

Parent topic: Task Instance History Resource