If you are using IS6.0 and above versions then try this scenario,
Configure a filepolling port that will poll the specified folder and it will grab those files and process it to a FlowService as a InputStream object (ffdata)and flow service logic will be
ffdata(serviceinput)
streamTobytes
bytesToString (file content)and then persist the content in the DB as per your requrirement.
So once this process successfully completes then the filepolling port can move this file to another folder that you have mentioned in the Archive folder (filepolling port settings).
If the flowservice done with errors then the file will be moved to Error directory that you have mentioned in the Error folder (filepolling port settings)
If IS4.6 then write javaservices to readFile that does polling files,moveFile or use PSUtilities package services that will provide the listofFiles in the specified folder and using pub.file:getFile service read the files onebyone and persist the content in DB and use moveFile javaservice that moves to another folder.
hi rmg.,
Thank u .im using IS6.0 and almost i done in the same way. in a flowservice i called a Java Service which does the file transmission and passes the required Data to Pipe.
Regard’s
Kartheek
hi friends, i was going through he above post as my requirement is also same where i have to move a file from one folder on harddisk to another.
i read about this moveFile java service but am not bale to find it , i am using wM6.5 , so is this a ready made Java Service provided by wM or is this some one we have to code .
thanks
Basically moveFile is not a standard builtin service,get the PSUtilities package from Advantage.webmethods.com,these packages/services created by WM professional services which helps users in the webMethods community.
Get this package and either copy the service to your local folder or invoke from the same package and make sure you deploy the same package to diff environments if your company agrees.
Meanwhile these services have been made available in WmPublic.
Remember to configure fileAccessControl.cnf in WmPublic/config accordingly and reload WmPublic afterwards.