A frequent question I get asked is how to check for the existence of a given promoted property in the message context, inside an orchestration. The answer is the “exists” operator, described briefly in the documentation, which returns a boolean. With it, you can use an %u00abif%u00bb or a Decide Shape to do the test. Example usage:


MyPropertySchema.MyProperty exists myMessage


Somewhat magic, I think.


If you have a distinguished field, instead of a promoted property, you can resort to a different technique, based on the use of the xpath function:


theStringValue = xpath(inputMessage, “string(//*[local-name()=’MyElementName’])”);


And now you can use System.String.IsNullOrEmpty(theStringValue) to check if the value is present.