Action | Built-In Service to Use | ||
Retrieve a delivery task from a queue | wm.tn.queuing:getQueuedTask service. When you invoke this service, you pass it the name of the queue from which you want a delivery task. The service returns the oldest task in the queue; the task includes the document to deliver. When you retrieve a task from the queue, the task is not removed from the queue. Instead, the status of the delivery task is updated from QUEUED to DELIVERING. How the delivery task is represented depends on how your scheduled delivery service is written: ![]() ![]() | ||
Typically, your scheduled delivery service should invoke the wm.tn.queuing:getQueuedTask service and process delivery tasks until the queue is empty (that is, until you have processed each of the QUEUED delivery tasks in the queue). When the queue is empty, the wm.tn.queuing:getQueuedTask service returns null for the task variable.
| |||
Deliver the document | One of the built-in services in the pub.client folder, or one of your own custom transport services. After your scheduled delivery service retrieves a delivery task, it should deliver the document that is returned with the task information. | ||
Update the delivery task | wm.tn.queuing:updateQueuedTask service. the service uses the returned status to update the delivery task status: ![]() ![]() ![]() ![]() The wm.tn.queuing:updateQueuedTask service also takes care of logging the results of the delivery to the activity log. |