0

I'm passing a message in biztalk that is resulting in the following suspended message:

Inner exception: A failure occurred while evaluating the distinguished field MessageStatus against the message part data. The message part data does not contain at least one of the nodes specified by the XPath expression (listed below) that corresponds to the distinguished field. The cause for this error may be that the message part data has not been initialized or that the message part data does not conform to the message

In my orchestration I'm using a map that maps an ID called textID to the textID field in my constructed message "MessageAttempt". I also have a field called MessageStatus with the value set to "Nothing" not to be confused with .

After my map I use a message assignment shape to set the MessageAttempt.MessageStatus element to "Attempted" with the following code:

Message_MessageAttempt.MessageStatus = var_Attempt;

I been trying to figure this out all day. I have a similar ConstructedMessage/Transform/Assignment shape on a different branch in my orchestration set up the same and works just fine. I'm not sure what I could be missing.

Dan Field
  • 20,885
  • 5
  • 55
  • 71
Gakko no Ato
  • 105
  • 15
  • Put a break point in your orchestration just after the construct and look at what the message looks like and if it has the MessageStatus node & whatever it's parent is. – Dijkgraaf Mar 21 '15 at 03:00

1 Answers1

1

The XPath functoin can't find the element. There are two possible reasons for this.

  1. The element doesn't exist. If it doesn't exist, you have to create it first. You can do this In the map by setting its value property to <empty>, or using an empty String Concatenate functoid with its output into that node.
    You should be able to verify this by going into the group hub, opening the suspended message, and viewing the message part. You'll find that it doesn't contain the node the XPath refers to.

  2. The namespaces in the message are not qualified properly. XPath in orchestrations runs into issues if you don't use namespace prefixes for the message and just rely on the default/empty xmlns.

Dan Field
  • 20,885
  • 5
  • 55
  • 71