| Dean Cyril Wood 2005-02-28, 5:53 pm |
| I have come across a strange situation in the way an expression is evaluates
and am hoping someone out there has some feedback.
I have a decide shape and need to have an expression evaluate to true only
under certain conditions and false under all other.
- The decide shape expression evaluates 3 tags.
- there is no guarantee that all 3 tags exists. If they exist then they can
be either null or non-null.
- Only the following situations need to evaluate to true
- all 3 tags exist and are NULL
- all 3 tags exist and have the same value.
- all other conditions should evaluate to false.
I currently have the following expression "ReceiveDOCBO.SellingCountry ==
ReceiveDOCBO.ShippingCountry && ReceiveDOCBO.SellingCountry ==
ReceiveDOCBO.CustomerCountry)
What I found is that if one of the tags do not exist the expression
evaluates to true if the other two tags exist and have the same value. I need
this to evaluate to false.
I tried understanding how BizTalk deals with an expression like I have above
when one or more of the reference tags are missing from message. Does it drop
that part of the expression where a non-existing node is referenced?
Any ideas/explanations?
Any suggestions on how I can get the expected results? I tried finding
expressions that I can use to test whether or not a node exists but have not
found one yet that I can use in an expression (other than in a receive shape
which I cannot use).
thanks,
Dean Cyril Wood
|