In some BizTalk solutions, we need to access properties promoted to the message context by receive pipelines or adapters and use them inside orchestrations. We can access both native and custom promoted properties by using expressions like the following:
PortName = MyMessage(BTS.ReceivePortName);
MyFileName = MyMessage(FILE.ReceivedFileName);
MySubject = MyMessage(POP3.Subject);
MyCustomProperty = MyMessage(MyPropertyPromotionNamespace.PropertySchema.ID);
But while I was doing that to access an EDI property, I got the following error:
Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘MyOrchestrations.D96A_Orders(8925ca53-20e8-8960-8ef3-b1c88cd46d8a)’.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 948996b6-f612-4ae2-9668-035183855656
Shape name: Construct OrderExtendedProp Msg
ShapeId: 40b80329-0eb4-417b-9205-6d3ff0626306
Exception thrown from: segment 1, progress 7
Inner exception: There is no value associated with the property ‘EDI.UNB3_2’ in the message.

📝 One-Minute Brief
Fix the BizTalk Server orchestration error “There is no value associated with the property in the message” by understanding why message context and promoted properties can be missing at runtime and how to prevent orchestration failures.
Cause
One disadvantage of accessing promoted properties within an orchestration is the need to verify that they actually exist. If they don’t, BizTalk throws this error. In most cases, the message context does not contain the property you are trying to read inside the orchestration.
In my case, I was trying to read UNB 2.3 EDI property inside the orchestration:
varUNB32 = msgOrder(EDI.UNB3_2);
However, the EDI file didn’t have the proper UNB 3.2 setup, so it wasn’t promoted within the receive pipeline.
Solution
When you try to access Promoted properties inside the Orchestrations, to avoid these types of errors, you should check if the Promoted property exists before trying to read it by using the exists operator.
//GET UNB3.2
if(EDI.UNB3_2 exists msgOrder)
{
varUNB32 = msgOrder(EDI.UNB3_2);
}
else{
varUNB32 = "";
}
The exists operator checks whether a message context property exists in a given message and returns true or false. It can be used in Expression, Message Assign, or Decision Shapes.
Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more, you can buy (or help me buy) my son a Star Wars Lego!