How to extract attributes from bizdoc

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,


Did you tried making use of 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.



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:
– 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

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,


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