How to write to a file.

Hello,
I need to save my output into a flat file.
How to do it?

Hi ,

May be after the Data Processing is done you can use the following inbuilt service to wrie to a Flat File.

sample.IO.test:writeToFile

This flow takes the string and writes into the flat file according to the specified path.

Map the string in Pipeline In to fileContent in Service In and Hard Code the filename as the Path name of the file where you want to write.

Depends what you want to do…

You can create your own java service for this as suggested.

Or…

You can simply save your pipeline.
See the built-in service reference document…
pub.flow:savePipelineToFile.

Instead of writing your own services you may also use the services included in the PSUtilities package, downloadable from https://advantage.webMethods.com/advantage?targChanId=kb_home&oid=1614310672

Hope this helps