Writing Custom delivery service

I am trying to write a custom delivery service for my Trading Networks documents. It will be exactly like the http delivery service except for the fact that I want to kick of an email when the service fails and the number of retries is exhausted. I cannot use the standard http delivery service because

  1. It expects the data in the xmldata content part, which is not true in my case.

  2. It does not send any email notifications on task failure.

I have built the custom delivery service and it works fine except for the fact that it does not send out the email. In my service I branch on the variable “retriesRemaining” and when it equals the number of retries I send out an email. The problem I am running into is that the variable “retriesRemaining” that is expected by the delivery service specification is not there in the pipeline. The webMethods documents also mention that the delivery engine sets this value on each run. But it never does.

Does anybody know why this happens ? Is this a bug ? And is there a fix for this ?

Any input is appreciated.

Rupinder - I remember this being mentioned somewhere as a bug (can’t remember where though) . Do you have to send email on every failed delivery - is it possible to run a report (say, at end of day) on failed deliveries for that day and resend them the next day? If, so here’s one way to do that:

(Set timeCreated as needed, taskType=DELIVERY, and taskStatus=FAILED)
LOOP over /results