I want to save incoming messages to disk and I want to create a structure that follows the date when the message arrived.
E.g. c:\temp\YYYY\MM\DD\
Will be done on both windows and AIX machines
Any ideas?
//Fredrik
I want to save incoming messages to disk and I want to create a structure that follows the date when the message arrived.
E.g. c:\temp\YYYY\MM\DD\
Will be done on both windows and AIX machines
Any ideas?
//Fredrik
Fredrik,
After receving the inbound message to a flowservice invoke a WmSamples service (sample.IO.test:writeToFile)which has inputs of filename,filecontent.So get the current date(pattern=yyyyMMdd) using WmPublic Date services and using pub.string:concat (instring1=(diskpath/filename,instring2=above mentioneddate)and then map the output to writeToFile(filename).This will archive file to disk work for windows may be AIX too.
HTH,
RMG.
If you want the year, month, and day to be nested directories, as in your example, then you’ll probably need to use a Java service using the File class to create the directories first. Then you can use the sample.IO.test:writeToFile service (that’s in the WmSamples package) to write the file.