As I’m trying to take advantage of TN in webMethods, I’m want to send a document via FTP to a trading partner with the help of TN. Basically what I want to know is how to submit a document (of type mydocDT) to TN so that it sends it at at midnight to trading partner x. The processing rule is done, but how do I submit the document to TN so that it actually processes it?
wm.tn:submit (which I believe is the one to use) takes a bizdoc as input, but how do I make mydocDT into a bizdoc?
To submit a IS documents to TN there are several ways…But follow this way that routes documents to TN use the wm.tn.doc.xml:routeXML or wm.tn:receive service and map the node input
(once you have after you convert mydocDT using RecordToDocument gives xmldata then StringToDocument (4.6services), or DocumentToXMLString then XMLStringToNode)(6.x services)
Thanks for your replies guys. I have done as you suggested, and it still doesn’t work as expected. TN identifies the IS Document (mydocDT) if I also have an object named ‘ffdata’ (which is a stream) in the pipeline. ffdata doesn’t do anything except sit in the pipeline. But without it, TN doesn’t recognize my document (mydocDT). This is really strange and it doesn’t make any sense at all to me.
This works fine:
TN_param — wm.tn.doc.xml:routeXML —> recognizes document
node ------/
ffdata (just some random stream)
“Trading Networks expects the flat file document content as an input stream in a variable named ffdata. You can parse the content into an iData object for your own processing”
sigh If ffdata is required then it should be a mandatory input </rant>
You’ll find that there are other pipeline variables that the entry services of TN support as well. One is edidata. It is indeed maddening that they are not listed as inputs to the services that take them.
To route Flatfiles to TN use this service routeFlatFile located in the WMTN package.and pass the ffdata(Stream object).
once you have done convertToString then use stringTobytes and then bytesToStream (ffdata).