When we migrate some BizTalk apps from BizTalk 2006 R2 to BizTalk 2010, and we ran into issue when a .net component called inside the orchestration. In the .net component we are trying to retrieve some promoted property and we also checked in the BizTalk group hub to validate it was promoted, no issues there. Only when we try to access the data into the .net component we had issue. We just moved all the assembly what we had in BizTalk 2006 R2 to BizTalk 2010, didn’t recompile anything in BizTalk 2010 environment. But looking further there is couple of new namespace added to the Microsoft.XLANGs… in BizTalk 2010 compared to BizTalk 2006 R2 caused the issue. So all we did to fix the issue is recompile the project in 2010 environment and it worked fine. So it looks like some backward compatibility issue.
public static void Load(XLANGMessage msg)
{
try
{
// get the process id from context.
object ctxVal = msg.GetPropertyValue(typeof(ProcessID));
…
}
BizTalk 2010:
Error Message in the event viewer:
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: 441d73d3-2e84-49d2-b6bd-7218065b5e1d
Shape name: Bulk Load
ShapeId: bb959e56-9221-48be-a80f-24051196617d
Exception thrown from: segment 1, progress 65
Inner exception: A property cannot be associated with the type 'Tellago.Common.Schemas.ProcessId'.
Exception type: InvalidPropertyTypeException
Source: Microsoft.XLANGs.Engine
Target Site: Microsoft.XLANGs.RuntimeTypes.MessagePropertyDefinition _getMessagePropertyDefinition(System.Type)
The following is a stack trace that identifies the location where the exception occured
at Microsoft.XLANGs.Core.XMessage._getMessagePropertyDefinition(Type propType)
at Microsoft.XLANGs.Core.XMessage.GetContentProperty(Type propType)
at Microsoft.XLANGs.Core.XMessage.GetPropertyValue(Type propType)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXMessage.GetPropertyValue(Type propType)
at Microsoft.XLANGs.Core.MessageWrapperForUserCode.GetPropertyValue(Type propType)
at Tellago.Common.Components.Load(XLANGMessage msg)
at Tellago.SuspensionProcess.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)