Help needed on Schedular Services

Hi,
I am trying to write a schedular service which checks for acknowledgements for Create Orders and Cancel Orders in TN database. If for any Create or Cancel there is delay for 60 mins in sending the ack then it will mail our TN Partner the corresponding info abt the create/cancel order number for that ack. I am using Trading Networks 6.0.1 and IS 6.0.1.
Any Ideas will be greatly appreciated.
Thanks,
Shweta

There are several services that you can use to query the TN database in your scheduled service. Look in the TN Programmers Reference (should be in the doc directory of your TNConsole install, or you can get it on Advantage) for the wm.tn.query folder and contained services. You can query for received documents, for events that show up in the activity log, for delivery tasks, and for partner agreements. You probably are interested in looking for delivery execution tasks that have not yet succeeded, and if they’ve been failing for at least 60 minutes, sending an email.

Regarding how to Query the documents from TN database using wm.tn.Query built-in services as Skip Franklin mentioned above,

Please check this thread:
[url=“wmusers.com”]wmusers.com

HTH.

Hi Skip and RMG,

I tried all the above ways. Actually, I wrote a sequence which gets the PO request order data ( i used view, createDocumentQuery and documentQuery). I have set the disablePaging to true. Next I wrote another sequence which gets all the Acks.(Same as above).
Now, I branch on the resultCount of ackResults and if it is not ‘0’ then I loop over the ackResults. in that loop I called view,xmlStringToXMLNode,xmlNodeToDocument and also in the loop I looped over the createResults and called view,xmlStringToXMLNode,xmlNodeToDocument. Now I did a map where it has to map the Order numbers of createRes and ackRes. I did a String Compare where the str1 is the order number of createRes and str2 is the order number of ackRes. If they don’t match then an email notification will be sent.
Now that, is my logic correct? I am sure it should work…but it is failing at xmlStringToXmlNode. It is getting null as input.
Plse…help me
((((((((
Thanks,
Shweta

The wm.tn.doc:view service returns a bizdoc, not an XML string. You want to use wm.tn.doc.xml:bizdocToRecord instead of xmlStringToXMLNode and xmlNodeToDocument.

Skip,

We are using Rosettanet Pip standards. The bizDoc contains XML data. So we are using that. Plse…correct me if I am wrong. While receiving the doc from TN and validating structure of the doc, I called xmlStringToXmlNode to get biz doc content in bytes and then called xmlNodeToDocument. Please help me !

Thanks,
Shweta

What are you sending as the input to xmlStringToXmlNode? If it’s the output of the view service, that’s wrong. You need to use wm.tn.doc.xml:bizdocToRecord as I described previously. That will do the conversion to a document in one step. It doesn’t matter what standard you’re using - this is how you should get XML out of a TN bizdoc.

Hey Skip,

Thanks for the reply. I made a silly mistake…very silly. In my view service, getContent was set to false. That was not getting the content and null is being passed and errors started that way. Now it is working fine.
Skip, I will try using wm.tn.doc.xml:bizdocToRecord. But it is working fine even with xmlStringToXmlNode and XmlNodeToDocument.

Thank you very much for your help,
Shweta