Control Task Processing

Many Oracle Health Insurance applications make use of a queue based task distribution and processing mechanism. If task processing is:

  • started then the Oracle Health Insurance application picks tasks from the queue and processes these;

  • stopped then the Oracle Health Insurance application does not pick tasks from the queue.

Under normal conditions task processing is started. It can (temporarily) be stopped for importing a configuration set using the Configuration Migration Tool (CMT). When the configuration set is imported task processing can be started again so that tasks are processed with updated configuration data.

The "taskprocessing" resource can be used to:

  • determine the status of the task processing mechanism;

  • (temporarily) stop task processing;

  • start task processing (when it was stopped).

Determine Task Processing Status

The resource also allows inquiry about the status by executing:

GET /taskprocessing

which returns a response like the following when task processing is started:

{
  "status": "started",
  "statistics": {
      "waiting": <number>
      "ready": <number>
      "expired": <number>
  }
  "links": {
      "defaultLink": [
          {
              "rel": "self",
              "href": "http://host:8001/api/taskprocessing"
          },
          {
              "rel": "taskprocessing:control",
              "href": "http://host:8001/api/taskprocessing?action=stop",
              "httpMethod": "POST"
          }
      ]
  }
}

The client can determine the options based on the links, for example, stop task processing using the "taskprocessing:control" option.

The statistics part is useful for monitoring the queue. The "waiting", "ready" and "expired" fields originate from the V$AQ database view.

For convenience, the meaning of these 3 properties is repeated here:

  1. "waiting": Number of messages in the queue in the state 'WAITING'. Waiting messages are queued with a delay, and the delay has not gone by yet.

  2. "ready": Number of messages in the queue in the state 'READY'. Ready messages are available for dequeue by the Oracle Health Insurance applications.

  3. "expired": Number of messages in the queue in the state 'EXPIRED'. Expired messages are messages that are not dequeued within the expiration time.

Stop and Start Task Processing

The links and the associated HTTP Method can be used to change the task processing dequeue status. If the request succeeds the system will respond with a 200 OK status and an appropriate set of options.