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.  Flat File Parsing

    Posted Fri September 17, 2004 10:47 PM

    Guys,
    I need to parse csv files. I am using

    pub.file.getFile  
    To convert file to Object 
    pub.flatFile.convertToValues 
    To parse the files 
    
    Some times if the files is not in accordance with the Flat File struture/Schema, the flow Service is just processing. I mean it should ideally it should exit the service with some kind of error message. 
    

    Can some one help me out.

    Thanks,
    Brain.


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


  • 2.  RE: Flat File Parsing

    Posted Sat September 18, 2004 12:29 AM

    Hi Brain,

    Do you have sequence steps(try/catch blocks).If yes, have you set “Exit on Failure” for ‘try’ Sequence step.

    HTH.

    Pauly


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


  • 3.  RE: Flat File Parsing

    Posted Sat September 18, 2004 03:08 AM

    Brain,

    As Pauly said use the Try/Catch Sequences,here is the snippet,

    Sequence(Exit on SUCCESS)
    —>Sequence(Exit on FAILURE)–Try
    -------pub.file.getFile
    -------pub.flatFile.convertToValues
    ------->Mapping steps…
    ---->Sequence(Exit on DONE)–Catch
    ------>pub.flow:getLastError(this output holds all the error dump)
    ------->Nofify the Errors(using pub.client:smtp)
    ------->Exit the flow (Failure)

    So any kind of Invalid Schema,null pointer exceptions the errors will be caught in the DONE sequence.

    HTH,
    RMG.


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


  • 4.  RE: Flat File Parsing

    Posted Mon September 20, 2004 09:46 PM

    Guys,
    I am using the above given steps. But some times, it goes into a loop in step 3 (-------pub.flatFile.convertToValues).

    Its hanging up in the above step and is never coming to Mapping Steps.

    Thanks,
    Brain.


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


  • 5.  RE: Flat File Parsing

    Posted Mon September 20, 2004 09:55 PM

    Brain,

    If you are setting iterate=true in the pub.flatFile.convertToValues, and then check on the ffIterator value is “null” in the pipeline, then you have to Exit the loop and move the process further.

    HTH
    RMG.


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


  • 6.  RE: Flat File Parsing

    Posted Tue May 03, 2005 07:43 AM

    Hi RMG,

    what do i have to input to the loop!
    Before the pub.flatFile.convertToValues i only have the getFile(as Stream)!!!??

    pls can you help?
    thx Werner


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


  • 7.  RE: Flat File Parsing

    Posted Sat August 11, 2012 03:04 PM

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