I am not sure what I am doing wrong.
I have four variables that are passed to an orchestration.
I have a message within that orchestration called ErrorNotice.
I want to assign the four variable parameters to the corresponding fields in the error notice message.
The message fields are promoted as distinguished fields.
This is the code I am using now:
=============================
ErrorNotice = new System.Xml.XmlDocument();
//Message.Field = Parameter
ErrorNotice.ErrorCode = ErrorCode;
ErrorNotice.ErrorDescription = ErrorDescription;
ErrorNotice.ErrorLocation = ErrorLocation;
ErrorNotice.ErrorResolution = ErrorResolution;
=====================================
This code is generating the following error
====================================
Microsoft.XLANGs.RuntimeTypes.XPathUpdateException: A failure occurred while evaluating the distinguished field ErrorCode 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 part schema. Ensure that the message part data is initialized correctly.
XPath expression: /*[local-name()='ErrorNotice' and namespace-uri()=']/*[local-name()='ErrorCode' and namespace-uri()='']
at Microsoft.XLANGs.Core.XSDPart.SetDistinguishedField(String dottedPath, Object val)
at BHPB.E2E.Orchestrations.Common_ErrorNotice.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Microsoft.XLANGs.RuntimeTypes.XPathUpdateException
====================================
Any assistance would be greatly appreciated.
I have four variables that are passed to an orchestration.
I have a message within that orchestration called ErrorNotice.
I want to assign the four variable parameters to the corresponding fields in the error notice message.
The message fields are promoted as distinguished fields.
This is the code I am using now:
=============================
ErrorNotice = new System.Xml.XmlDocument();
//Message.Field = Parameter
ErrorNotice.ErrorCode = ErrorCode;
ErrorNotice.ErrorDescription = ErrorDescription;
ErrorNotice.ErrorLocation = ErrorLocation;
ErrorNotice.ErrorResolution = ErrorResolution;
=====================================
This code is generating the following error
====================================
Microsoft.XLANGs.RuntimeTypes.XPathUpdateException: A failure occurred while evaluating the distinguished field ErrorCode 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 part schema. Ensure that the message part data is initialized correctly.
XPath expression: /*[local-name()='ErrorNotice' and namespace-uri()=']/*[local-name()='ErrorCode' and namespace-uri()='']
at Microsoft.XLANGs.Core.XSDPart.SetDistinguishedField(String dottedPath, Object val)
at BHPB.E2E.Orchestrations.Common_ErrorNotice.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Microsoft.XLANGs.RuntimeTypes.XPathUpdateException
====================================
Any assistance would be greatly appreciated.