Using the Task Engine RESTful Web Services in IBM My webMethods Server
Overview
IBM webMethods BPM Task Engine enables web applications to use RESTful services in IBM My webMethods Server and directly communicate with the Task Engine.
The Task Engine RESTful services for IBM My webMethods Server share the data structures of the web services API, as described in the Summary of Data Structures.
You can specify the RESTful service parameters as key-value pairs in the RESTful web service URL, or as part of an associated JSON document.
Note that the parameters of the Task Engine RESTful services for IBM My webMethods Server are case-sensitive. Also, you cannot specify the service parameters in an XML file.
Summary of REST Resources and Requests Through IBM My webMethods Server
IBM My webMethods Server provides REST requests that can be applied to the following Task Engine resources:
Task Instances
Request | Description |
---|---|
DELETE a Task Instance | Deletes an instance of a task on the Task Engine. |
GET Task Instance Information | Returns the TaskInfo object, and optionally the TaskData object, for a specified task. |
POST a New Task Instance | Creates a new task instance and adds it to the Task Engine queue. |
PUT Information in a Task Instance | Modifies a task instance on the Task Engines. |
GET Tasks with a Simple Search Request | Retrieves tasks that match simple search criteria. |
POST a Complex Task Search Request | Retrieves tasks that are specified with more complex search criteria. |
Task Audit Information
Request | Description |
---|---|
GET Task Audit Information | Returns the audit log of all of the operations performed on a task, or a specific audit entry. |
DELETE Audit Entries to Rollback Task | Enables you to roll back the task to any available audit point in the task's audit history. |
GET or POST a Form Flow Notification | Notifies a waiting step in a task workflow that the workflow is completed. |
Task Comments
Request | Description |
---|---|
DELETE Task Comment | Deletes the specified task comment from a task instance as well as all associated attachments. |
GET Task Comments | Returns either a specific comment or all the comments in a task instance including associated attachments. |
PUT Updates into a Task Comment | Updates a comment in a task instance, including attachments associated with the comment. |
POST Task Comment | Adds a comment to a task instance. Attachments can be included. |
Task Tags
Request | Description |
---|---|
DELETE Tags From Task | Deletes all tags associated with a task ID. |
GET Recommendation By Tags | Returns recommended experts for the tags associated with a task ID. |
GET Tags By Task | Returns a list of tags associated with a task ID. |
POST Tags To Task | Adds specified tags to a task ID. |
PUT Task Tags | Updates tags associated with a task ID. |
Task Attachments
Request | Description |
---|---|
DELETE Task Attachment | Deletes the specified task attachment from a task instance. |
GET Task Attachments | Returns all the attachments in a task instance. |
PUT Task Attachment | Updates the specified task attachment in a task instance. |
POST Task Attachment | Adds the specified attachment to a task instance. |
Examples
- To retrieve
the details of a task instance with ID 7565, make the following
REST call to the Task Engine through the IBM My webMethods Server running on the local machine:
GET /rest/pub/opentask?taskID=7565
- To post a JSON document as task attachment:
POST /rest/pub/opentask/taskID/attachments
Sample JSON document Content:
{"attachment":[{"name":"test_comment_attach","base64Data": "VGhpcyBpcyBhIGxvbmcgY29tbWVudCBmb3JtIG1lIGZyb20gdGhlIHRleHQgZmlsZQ==", "contentType":"text/plain"}]}