Add a Task Comment

post

/ic/api/process/v1/tasks/{id}/comments

Adds a comment to a task.

Request

Supported Media Types
Path Parameters
Body ()
CommentRequest
Root Schema : commentRequest
Type: object
The representation of a CommentRequest
Show Source
Back to Top

Response

Supported Media Types

200 Response

Comment successfully added
Body ()
Root Schema : comments
Type: object
Show Source
Nested Schema : comment
Type: array
Show Source
Nested Schema : comment
Type: object
Show Source

400 Response

Bad request

404 Response

Task not found

409 Response

Stale task object found

500 Response

Internal Server Error
Back to Top

Examples

The following example shows how to add a comment to a task by submitting a POST request on the REST resource.

Send Request

The following example shows the contents of the send request:

https://example.com/ic/api/process/v1/tasks/<taskId>/comments 

Where,

  • example.com is the host where Oracle Integration is running.

  • <taskId> is the task ID that you get using Retrieve a Task List.

Example of Request Body

{
  "commentStr":"This is my comment.",
  "commentScope":"BPM"
  }

The allowed values for commentScope attribute are:

  • BPM : Use BPM option for the comment to be available on all tasks of a particular process instance.

  • TASK: Use TASK option for a task level comment.

Example of Response Header

Status Code: 200 OK
Date: Wed, 27 Apr 2016 00:53:16 GMT
Content-Type: application/json

Example of Response Body

{
 "levels": 0,
 "links": [
{
 "href": "http://example.com/ic/api/process/v1/tasks/200002",
 "length": 0,
 "rel": "parent"
},
{
 "href": "http://example.com/ic/api/process/v1/tasks/200002/comments",
 "length": 0,
 "rel": "self"
},
{
 "href": "http://example.com/ic/api/process/v1/tasks/200002/comments",
 "length": 0,
 "rel": "canonical"
}
],
"comment": [
{
 "commentStr": "This is my comment",
 "updatedBy": "jsmith",
 "userId": "jsmith",
 "updateddDate": "2016-12-19T06:10:21.000Z",
 "commentScope": "BPM"
}
]
}
Back to Top