none
Unable to get exact error from ErrorReport.Description property in orchestration RRS feed

  • Question

  • Hi Guys,

    I have a ReceivePort named A in which "enable routing for failed message property" is cheked. In orchestration,I make a filter on receive shape ErrorReport.ReceivePortName="A" and I am using direct binding(message box) on receive port. After receive shape I wrote some code on expression shape as below :

    MessageIn in XmlDocument type.I am using a custom pipeline in receive port A which has only one pipeline component XML Validator.

    If I put a wrong message in Receive port A then no message will be suspended because "enable routing for failed message"is enable on receive port and orchestration is subscribing the error message.

    But when I put a wrong message then I got a error on event log :

    Please tell me why I am getting the above error after being used "enable routing for failed message"property.

    In event log  , I got the value ErrorDescription="Failed Message" and ErrorType is empty.

    Please tell me why the value of ErrorDescription is "Failed Message" and Error Type is empty.Why I did not get the above error(ID element has an invalid value according to its data type in ErrorDescription)? And how can I get the error in orchestartion ?


    Thanks

    Monday, December 26, 2016 6:28 AM

Answers

  • Hi Shivay,

    I just want to add few points regarding the Error not updated in the Event log,

    From the code which you have written in edit expression shows like, it is not updating the Error description with Error Type. It is just REPLACING the Error Description with Error Type.

    Just try to change the code like below and try once again, it may help you to get the error in event log:

    ErrorDescription = System.Convert.ToString(MessageIn(ErrorReport.Description));

    ErrorDescription = ErrorDescription + System.Convert.ToString(MessageIn(ErrorReport.ErrorType));

    Kindly click Mark as answer, if it helps to you.

    Regards,

    Kathiravan

    • Marked as answer by Shivay_ Monday, December 26, 2016 6:07 PM
    Monday, December 26, 2016 2:25 PM

All replies

  • Hi Sivay,

    Same behaviour has been raised before on the forum: How to capture the pipeline validation error messages in BizTalk

    If you Use XmlReceive pipeline and setting the ValidateDocument property to true or create a custom Receive Pipeline and use the XmlValidate pipeline component in the validate stage.
    In both the scenarios, the incoming message is validated inside a receive pipeline and an exception is raised if the message fails validation, eventually suspending the pipeline service instance. You'll see description of the error messages both in event log and suspended instance with associated messages in the admin console.

    The out of the box validating components aren't especially verbose about what or why things fail and not in this granular level. I think your best bet will be to write your own validating pipeline component. You can also write custom property say "CustomErrorDescription" to the context of the message and use this in orchestration or anywhere later. BizTalk overwrites the standard Description property even if you write in the custom component.

    Sample: https://social.technet.microsoft.com/wiki/contents/articles/32712.biztalk-custom-xml-validation-to-get-error-summary.aspx

    http://blogs.biztalk360.com/extended-xmlvalidation-pipeline-component/



    Rachit Sikroria (Microsoft Azure MVP)

    Monday, December 26, 2016 7:38 AM
    Moderator
  • Hi Shivay,

    I just want to add few points regarding the Error not updated in the Event log,

    From the code which you have written in edit expression shows like, it is not updating the Error description with Error Type. It is just REPLACING the Error Description with Error Type.

    Just try to change the code like below and try once again, it may help you to get the error in event log:

    ErrorDescription = System.Convert.ToString(MessageIn(ErrorReport.Description));

    ErrorDescription = ErrorDescription + System.Convert.ToString(MessageIn(ErrorReport.ErrorType));

    Kindly click Mark as answer, if it helps to you.

    Regards,

    Kathiravan

    • Marked as answer by Shivay_ Monday, December 26, 2016 6:07 PM
    Monday, December 26, 2016 2:25 PM
  • Thanks Kathiravan !

    You are right.I changed the code as below :

    And got the desired value .

    ErrorDescription:

    There was a failure executing the receive pipeline: "TestPropertyValidation.ReceivePipeline1, TestPropertyValidation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5f107a12c1a6ff01" Source: "Pipeline " Receive Port: "ReceivePort2" URI: "E:\Practicals\Pipelines\ValidationProjects\BizTalk.Common.V1\Locations\In\*.xml" Reason: The 'ID' element has an invalid value according to its data type

    ErrorType: Failed Message


    Thanks

    Monday, December 26, 2016 6:15 PM