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.  How to extract attributes from bizdoc

    Posted Tue November 29, 2005 04:58 PM

    I have a bizdoc in the pipeline and I want to extract the value of a custom attribute. What is the best way to do this? I don’t see any built-in services for this but the ‘Attributes’ document in the BizDocEnvelope does not seem to have any structure to work from, either. Thanks,

    Tim


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


  • 2.  RE: How to extract attributes from bizdoc

    Posted Tue November 29, 2005 05:18 PM

    Did you tried making use of wm.tn.docattr:view and map the internalid of the doc attribute from the bizdoc if it exists.just a shot in the dark,i tried only extracting profile custom externalfield values.

    But i am not sure if you can extract attribute value from pipeline.

    HTH,
    RMG


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


  • 3.  RE: How to extract attributes from bizdoc

    Posted Tue November 29, 2005 07:04 PM

    Tim,

    Although the element Attributes of BizDocEnvelope does not have any defined structure, during run-time Trading Networks will add your attributes under that element.

    So, for example, if you have an attribute called orderID, during run-time there will actually be a string called orderID inside Attributes and this string will contain the value extracted from the document.

    Therefore, if you know the attribute name during development (which you should), you can assume the attribute will be there and you can map the attribute value via variable substitution (ex. %bizdoc/Attributes/orderID%) or by creating a dummy document in “Pipeline In” called bizdoc with the following structure, for example:
    bizdoc
    – Attributes
    — orderID
    You could then map straight out of orderID, if you would like.

    I don’t know if this is the webMethods’ recommended way of doing this, but it’s worked for me in the past.

    • Percio

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


  • 4.  RE: How to extract attributes from bizdoc

    Posted Tue November 29, 2005 07:29 PM

    Thanks for the replies RMG and Percio. I ended up doing basically what Percio describes after looking at the pipeline contents in the debugger during execution. I put in a branch on /bizdoc/Attributes/[attribute name] so I could trap the null condition (attribute not present) and put my processing logic under the default branch. I’m glad to know I’m not missing something obvious in the built-in services. Thanks again,

    Tim


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


  • 5.  RE: How to extract attributes from bizdoc

    Posted Tue November 29, 2005 07:37 PM

    A cool solution,it helps for everyone,Thanks Percio for jumping on this.

    HTH,
    RMG


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