Testing for a Null Value using the Message Filter Primitive

If you’re creating a Message Filter primitive in a mediation flow using WebSphere Integration Developer, it may not be immediately obvious how to define a criterion that will fire when an element of the message is null. The following XPath expression should be sufficient:

count(/body/myOperation/myElement) = 0

Obviously, the expression inside the brackets should be replaced with the part of the message you wish to test. You can find this easily by using the regular XPath editor. Then click ‘Override’ and alter the expression so that it is of the form shown above.

Thanks to Ian for help with this tip.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: