IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

TN delivery errorhandling service

  • 1.  TN delivery errorhandling service

    Posted Tue May 24, 2005 10:39 PM

    I need to write a service that will check to see if TN successfully delivered the message I sent to it.

    Should I write the service and use it in the “Execute a service” action under the processing rule along with the “Deliver Document by:” action, or should I write it and invoke it in a flow service after I send the doc to TN?

    what are the WmTN service I can invoke to query the status of the particular transaction’s activity tasks…?

    thanks.


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: TN delivery errorhandling service

    Posted Wed May 25, 2005 03:22 PM

    Luke,

    Once you send the doc to TN for delivery crate a wrapper flowservice and make use of the wm.tn.task services like getTasks,getTaskStatus etc…for status of the delivery task which will be viewed in the Task tab of TNConsole which gives us the information Done or Failed or Pending.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 3.  RE: TN delivery errorhandling service

    Posted Wed May 25, 2005 04:24 PM

    can you elaborate on what you mean by a wrapper flowservice?

    the task services (getTask, getTaskStatus, etc) all seem to require an input of taskID…where can I get the tasks of the doc I just sent to TN? the getTasks service doesn’t seem to have any inputs at all!

    can you describe the steps the wrapper flowservice would have?

    thanks again.


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 4.  RE: TN delivery errorhandling service

    Posted Wed May 25, 2005 04:33 PM

    Luke,

    What i mean is in your flow once you send the document to TN for Delivery then use getTasks(no inputs required)this gives the all the internal identifiers (taskID’s)and so the appropriate taskID and map it to the getTaskStatus.

    Please also check the TNBISReference guide for more information,if it is unclear.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 5.  RE: TN delivery errorhandling service

    Posted Wed May 25, 2005 09:50 PM

    I added the tm.tn.task:getTasks after my wm.tn.submit, but it gets ALL tasks? 536 tasks. how can I get just the delivery task of the document I just sent in? I guess I could ASSUME that the last task in the list of tasks is the delivery task, get its status and make sure it is successful, but that doesn’t seem elegant…

    shouldn’t there be some way I can get the tasks associated with a certain bizdoc, ie. the one I just sent in?


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: TN delivery errorhandling service

    Posted Tue August 30, 2005 08:26 PM

    Hi Luke,

    How did you resolve this? I am going thru the same pain and I thought you could share your solution with the rest of us.

    Thanks in advance!


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 7.  RE: TN delivery errorhandling service

    Posted Tue August 30, 2005 08:39 PM

    invoke wm.tn.submit to put the bizdoc into TN (you’ll have to get your document to a bizdoc by using wm.tn.doc.xml:recordToBizdoc or some other method that create the bizdoc).

    if the processing rule for the document uses “Deliver document by,” then there will be a a variable called ‘deliveryId’ placed onto the pipeline when the wm.tn:submit service is invoked.

    you can then pass that deliveryId to wm.tn.delivery:getDeliveryStatus service.

    I did this in a repeating sequence, and I branch on the ‘deliveryStatus’ variable that getDeliveryStatus returns to determine what action to take…

    ‘DONE’ : signal success and exit the repeat
    ‘FAILED’ : signal failure, send an email, run a database query, then exit the repeat
    $default : do nothing - don’t exit the repeat, so it will continue to getDeliveryStatus until it either gets DONE or FAILED.

    hope that helps.


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: TN delivery errorhandling service

    Posted Tue August 30, 2005 09:10 PM

    Genius! I saw the use of the var deliveryId but in this case it makes it much easier.

    Btw, in my case I am using the EDIINT package to send the file using AS2 protocol and i had to add the scope ‘rec_in’ to prefix the var deliveryId in order to get the Task status, as follows:

    %rec_in/deliveryId%

    This is because the EDIINT services create the deliveryId within a specific context and they create the output vars within the scope ‘rec_in’. It works just fine.

    Thanks for your help!


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB


  • 9.  RE: TN delivery errorhandling service

    Posted Wed August 31, 2005 02:51 PM

    no problem. glad I could add back to the wmusers knowledge pool.


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration