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
Expand all | Collapse all

Extracting value from Record

  • 1.  Extracting value from Record

    Posted Tue January 21, 2003 03:36 PM

    Hi Experts,

    If I want to extract value of ST/BEG/BEGO1/code from EDIValues Record how should I go about? Is there any service provided which take a path(ST/BEG/BEG01/code) and gives a value.

    Thanks in Advance

    Uday


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


  • 2.  RE: Extracting value from Record

    Posted Tue January 21, 2003 03:37 PM

    just to add to my previous message, the path will be in a variable. Say this path is generated by errors record upon validating the EDIValues record.

    Thanks


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


  • 3.  RE: Extracting value from Record

    Posted Tue January 21, 2003 03:46 PM

    Use segment mapping.
    Or try substituting the value as %ST/BEG/BEG01/code%


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


  • 4.  RE: Extracting value from Record

    Posted Tue January 21, 2003 03:58 PM

    thanks VR,

    I tried using %pathName% (where path name contains the value ST/BEG/BEG01/code) but in the output variable its putting the contains or pathName variable. I want it to take the value of pathname variable and then evaluate that to extract the value from record.

    Uday


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


  • 5.  RE: Extracting value from Record

    Posted Tue January 21, 2003 04:03 PM

    First map the ST/BEG/BEG01/code to a new variable(eg. stbegbegcode) Then try %stbegbegcode% where you want to substitute the value.
    All the best!


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


  • 6.  RE: Extracting value from Record

    Posted Tue January 21, 2003 04:15 PM

    That would be correct when we know what to extract. but as i said it has to take ST/BEG/BEG01/code or ST/REF/… from a variable.

    Let me explain you the scenerio. I have a service which does the following things.

    1. envelopeProcess
    2. getTemplate
    3. getEDIString
    4. convertToValues
    5. validate

    after executing the validate i’m getting error (which i delibrately generating by altering the EDI) in erros record which had 3 fields 1. pathName which contains where the error occured, 2. Errorcode and 3. BriefMessage.

    Now taking the path from pathName field i want to extract the values from the EDIValues record. So the pathName field can contain any value need not be ST/BEG…


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


  • 7.  RE: Extracting value from Record

    Posted Tue January 21, 2003 04:20 PM

    Uday,

    I’m not sure there’s a way to do what you want because the value is always changing. I ended up creating a flow service that looped through errors and emailed them to an admin account.
    If you find a solution I’d be interested to know.

    Chris


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


  • 8.  RE: Extracting value from Record

    Posted Tue January 21, 2003 04:25 PM

    You can use queryDocument. You need to have a node representation of the EDIValues record that you passed to validate (do recordTODocument, stringToDocument). You can use the pathName as the XQL query.


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


  • 9.  RE: Extracting value from Record

    Posted Fri January 24, 2003 02:00 AM

    You could also write a custom Java service that uses an IDataCursor to navigate a variable path.

    It’s a little tougher than Rob’s suggestion. But you’ll get beeter performance than the recordToDocument / queryDocument route, especially in the case of a large record (like EDI).

    Regards,
    Theo


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