IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Move a file from one folder to another folder

    Posted Tue June 29, 2004 10:35 AM

    Dear All.,
    can anyone knows how to read a file from a perticular folder in Unix system. Folder

    name is hard-coded but not file name. once we read it from that folder we have to delete

    that File in that folder and we have to store the content of the file in Data Base (Oracle)

    and this file has to be moved to another folder.
    can anyone give technically steps to write a flow service for this.
    thanks&Regard’s
    kartheek


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: Move a file from one folder to another folder

    Posted Tue June 29, 2004 04:54 PM

    Madhav,

    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.

    HTH,


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Move a file from one folder to another folder

    Posted Mon July 05, 2004 01:20 PM

    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


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: Move a file from one folder to another folder

    Posted Wed February 22, 2006 09:10 AM

    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


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 5.  RE: Move a file from one folder to another folder

    Posted Wed February 22, 2006 04:06 PM

    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.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: Move a file from one folder to another folder

    Posted Tue December 04, 2018 04:26 PM

    Hi all,

    I just tried one service.
    This is very simple.

    1. Get the list of all the file names
    2. Loop over the filenames
    3. Concat the filepath and the file name
    4. Give this concatenated path to move file.

    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Move a file from one folder to another folder

    Posted Wed December 05, 2018 02:44 PM

    Meanwhile these services have been made available in WmPublic.
    Remember to configure fileAccessControl.cnf in WmPublic/config accordingly and reload WmPublic afterwards.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services