Problem Processing EDI in TN

Hi,

I am facing a problem with Trading networks.My flow service is picking up files from client inbox using FTP and sending them to Trading network using wm.tn:receive for further processing.All are EDI files.I am looping over the directory list of the files and passing it to wm.tn:receive.The TN process the first file and even after looping over the second file and sending it to TN it still processes the first file.I could see different files coming in after looping till wm.tn:receive but the TN process only the first file again and again.Can anyone pls help me!!!

regards
Peepa

Are you using the IS “file polling port” to process the files in a folder or are you using an IS Flow service to read the folder contents and loop over each one to send it to TN?

If using a Flow service, can you post the sequence of steps involved in reading the folder contents and looping over the filenames to invoke wm.tn:receive?

Mark

I am using flow service pub.client.ftp:login and then to get the list of files using pub.client.ftp .AFter getting the dirlist:(directory list) i loop over the list and pass the dirlist inside the loop to pub.flatFile:convertToValues.Using ffvalues i get the file name and pass it to pub.client.ftp:get.I am mapping the o/p from pub.client.ftp:get ie byte to the wm.tn:receive.

Look in the VANFTP folder (I may have the folder name wrong) in WmEDIforTN for code that retrieves EDI files from an FTP server and submits each to TN for processing. You can either use the services there directly, or copy them to your own package and modify them as needed.

If you don’t want to go this route, make sure you’re dropping all the appropriate work variables in your loop.

We have to use the custom flow services but even though i have dropped appropriate work variables it is still not working.

This has all the signs of a variable not being dropped. Are you dropping the ‘edidata’ variable after each call to wm.tn:receive? If not, this would cause the behavior you’re seeing.

Tim

Peepa,

Can you elaborate a bit more on your flow steps including input/output mappings till before you call tn:receive service?? Also upload the flow service screen shot (in maximize view) so that we can see dropped variables,work variables etc…

-RMG

Not surprising that you need to use your own custom services (though I’m curious as to why). It would still be worth your time to look at the services provided by wM. They are FLOW services and are viewable/copyable. Don’t spend a lot of time solving something that has already been solved.

The service VAN.VANConnectivity:getFromVAN in the WmEDIforTN package is a good example to work from. There is also a corresponding putToVAN service.

Tim

Hi Everyone,

Thank you all very much for all the valuable suggestions.I used the clearPipeline in the service and now it is working fine.

Peepa