views:

164

answers:

2

Hello,

I would like to know how to detect that a node is not present in the origin. I have tried hundreds of things with the logical functoids with no success.

The third case of this page is what I am looking for: http://danshultz.blogspot.com/2007/08/logical-existence-isnil-empty-string.html

Thanks in advance.

+1  A: 

You can use the Logical Existence functoid. If the element is missing from the source message, this functoid will return false.

If you need to perform some logic based on the element being missing (like map a default value to the output message), pass the Logical Existence functoid output to a Logical Not to return true, then connect the Logical Not output to a Value Mapping functoid with the second input set to whatever you want the default value to be.

BizTalkMama
Thanks for the response,Unfortunatelly that doesn't work, if there is no element the mapper does nothing.
Pablo Castilla
Perhaps there is another issue with your source message? I have tested this with a simple input message and it works as expected.
BizTalkMama
A: 

The only way I have managed to do it in a map is through XSLT in a scripting functoid.

Pablo Castilla