In attempting to run wm.EDIINT:send in a flow, mapping input parameters from other items in the pipeline I receive the error “Parameter input must be an InputStream” from the service wm.tn.mime.createMimeData. When I run my EDI data through the sample EDIINT send flow service, entering the parameters from the input box that pops ups, it runs fine. How do I need to enter these paramaters in a flow service automatically?
The EDIINT Send service requires that you call it from a flow and sending your content in a stream. In the step prior to calling wm.EDIINT:send call: pub.string:stringToBytes mapping your edidata string to the string of this service and it will return a bytes object. Next call: pub.io:bytesToStream which will convert your bytes object to a stream object. Next call your wm.EDIINT:send. You will open up the data record input and map your stream to the stream object of this record and set your content type to text/plain I believe for edidata. I am sending xml so I use a content type of text/xml. This should allow you to properly use the EDIINT send service.
Hope this helps
Daniel, thanks for your reply. I had thought I attempted it that way, but apparently had something wrong. I used content type “application/edi-x12”, pub.string:stringToBytes, pub.io:bytesToStream and it worked. I also stripped some carraige return characters from the string beforehand, not sure if they were causing a problem, but they weren’t supposed to be there anyway.
Hello, I can get a flow service in the developer to work to wm.EDIINT.send but when I FTP
the data to my custom flow, I don’t get the edidata for my bytetostream function. From FTP I use
" put sendx12wm edidata;application:EDIstream"
I have tried other combos also and am having problems.
I decided to try the envelopeProcess and this works fine on my X12 data.
As input to the process I changed the “edidata” properties from String
to object and then it works but the FTP nver returns.
your message shows Content-Type =“application:EDIstream”
well it should be Content-Type="application/EDIstream.
And input “edidata” object stream or string should work fine.For debugging invoke savepipeline and restorepipeline as the starting point in your custom flow service.
ms is right. content-type should be application:EDIStream when you ftp from a client.
OOps,Thanks for correcting…I thought it would applies to FTP as well,
For FTPing to a flow it comes in as a *node or edidata.
How does this *node get converted into a stream for the wm.EDIINT:send
process, without running convertToValues, etc. and changing the X12 data. I want to leave the data as is and pass it as a stream for the wm.EDIINT:send flow. I also have to inquiry into the data to set up the receiver info, etc…