Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Queuing Folder | Summary of Elements in this Folder | wm.tn.queuing:updateQueuedTask
 
wm.tn.queuing:updateQueuedTask
Updates the delivery status of a delivery task in a scheduled delivery queue.
Input Parameters
taskid
String Internal identifier of the delivery task to update.
queue
String The name of the scheduled delivery queue in which the delivery task you want to update resides.
status
String The status to assign to the delivery task. Valid values are:
*success The attempt to deliver the document associated with the delivery task was successful. Trading Networks updates the task status to DONE and the document status to DONE.
*fail The attempt to deliver the document associated with the delivery task failed.
If the delivery task has not reached the retry limit, Trading Networks increments the retry count and sets the task status to QUEUED.
If the delivery task reaches the retry limit, Trading Networks updates the task status to FAILED and the document status to FAILED.
statusMsg
String (optional) The message that the transport service returns after attempting to deliver the document.
timeDequeued
Object (optional) A timestamp indicating when the task was dequeued using the wm.tn.queuing:getQueuedTask service. The wm.tn.queuing:getQueuedTask service placed this value into the pipeline. Trading Networks uses this value to determine how long it took to deliver the document associated with the delivery task.
For Java developers, this is an instance of java.lang.Long.
serviceOutput
Document (optional) Data to save to the database. Specify the data as key/value pairs. The data type of serviceOutput is com.wm.data.IData.
This is useful when a scheduled delivery service has a very large output pipeline. When you use wm.tn.queuing:getQueuedTask to dequeue a delivery task from a scheduled delivery queue, wm.tn.queuing:getQueuedTask might throw an OutOfMemoryError if the scheduled delivery service has a very large output pipeline. To avoid this error, place the pipeline data from the scheduled delivery service into the serviceOutput parameter of wm.tn.queuing:updateQueuedTask. Data in the serviceOutput parameter is saved to the database.
Output Parameters
None.
Usage Notes
*Use this service when you create a scheduled delivery service. Typically, the scheduled delivery service invokes this service after it has invokes wm.tn.queuing:updateQueuedTask to dequeue a delivery task and has attempted to deliver the document associated with the delivery task. For an example of a scheduled delivery service, see the wm.tn.transport:batchFtp service. For a description about how to create a scheduled delivery service, including how to use the wm.tn.queuing:updateQueuedTask service, see webMethods Trading Networks Administrator’s Guide.
*Your service should not update the status of the delivery task or its associated document. Trading Networks updates these statuses based on whether you indicate success or fail for status. Additionally, Trading Networks also maintains the retry count of the delivery task.