none
Capturing DUPLICATE error file in a separate folder RRS feed

  • Question

  • Hi all,

    Im using one send port to capture to capture all the error files by giving filter"errorreport.errorttype= FailedMessage and errorreport.errortype "Exists".

    Even the duplicate control number error file also capturing in same folder.

    I want that specfic error file alone to capture in a separate folder.

    I used Errorreport.Failurecode with value as some hexadecimal number.. but tht s common for other error also.

    please suggest me how to capture that specific error file alone in a separate folder.IS there any filter to capture ?

    I tried errorreport.errordescription... but that property is not promoted.

    THANKS

    RENGARAJ

    Thursday, September 11, 2014 3:51 PM

Answers

  • The only [easy, natural in BTS] way to route different messages to the different targets is to use subscriptions. That means the messages should be differentiated by promoted properties.

    I suggest to analyse the promoted properties of the error messages and group the messages by different prom.properties or property sets.

    If it doesn't work you have to dig down into the error description and use some custom C# code to process it.


    Leonid Ganeline [BizTalk MVP] <a href="http://social.technet.microsoft.com/wiki/contents/articles/20258.biztalk-integration-development-architecture.aspx">BizTalk Development Architecture</a>


    Thursday, September 11, 2014 5:21 PM
    Moderator
  • The easiest way:

    1. Route the Error Messages to an Orchestration (don't worry about 'performance').
    2. Read ErrorReport.ErrorDescription to a string variable.
    3. Apply some filter to the ErrorDescription value with a RegEx or any other technique of you choice.
    4. Route accordingly with either a custom Promoted Property or bound Ports.

    You could also write a custom Pipeline Component that inspects ErrorReport.ErrorDescrioption to set a Promoted Property as well.

    Monday, September 15, 2014 12:30 PM
    Moderator

All replies

  • The only [easy, natural in BTS] way to route different messages to the different targets is to use subscriptions. That means the messages should be differentiated by promoted properties.

    I suggest to analyse the promoted properties of the error messages and group the messages by different prom.properties or property sets.

    If it doesn't work you have to dig down into the error description and use some custom C# code to process it.


    Leonid Ganeline [BizTalk MVP] <a href="http://social.technet.microsoft.com/wiki/contents/articles/20258.biztalk-integration-development-architecture.aspx">BizTalk Development Architecture</a>


    Thursday, September 11, 2014 5:21 PM
    Moderator
  • 1. Create your own schema which contains basic information about the error(s) like ErrorCode, ErrorDescription and promote these properties (property promotion). Suggest, create this in a separate BizTalk project (Say, Common.BizTalk.Errors). 

    2. Deploy the project. 

    3. Now, back in your project add the reference to Common.BizTalk.Errors. In your orchestration create a MessageType(msgErrType) of ErrorSchema created in step-1. 

    4. Use a Map or construct shape to assign values to the msgErrType. At this point you should know which error you are handling like SOAP, Delivery or any other. Assign a meaningful ErrorCode, Description to msgErrType message. 

    5. Now publish this message to MessageBox (Direct binding). 

    6. Deploy your project, in your send port filter properties use the content based routing with ErrorCode or ErrorDescritiption to route this message to designated folder.

    Ex: If Common.BizTalk.Errors.ErrorCode = 99999 route this message to Folder called CommonErrors

    Irrespective of the failure in BizTalk, the failed message routed to CommonErrors folder when the above filter criteria matches. 

    7. You can use the Common.BizTalk.Errors error message type in other projects as well. 

    This way you can efficiently use content based routing. 

    Regards,

    KP. 


    • Edited by KP141 Monday, September 15, 2014 2:42 AM
    Monday, September 15, 2014 2:14 AM
  • Kindly explain the process flow of your application so that we can assist you in a better way suited for you.

    Regards, Vivin.

    Monday, September 15, 2014 7:00 AM
  • The easiest way:

    1. Route the Error Messages to an Orchestration (don't worry about 'performance').
    2. Read ErrorReport.ErrorDescription to a string variable.
    3. Apply some filter to the ErrorDescription value with a RegEx or any other technique of you choice.
    4. Route accordingly with either a custom Promoted Property or bound Ports.

    You could also write a custom Pipeline Component that inspects ErrorReport.ErrorDescrioption to set a Promoted Property as well.

    Monday, September 15, 2014 12:30 PM
    Moderator
  • Create Orchestration Make it direct bound (bound to messagebox). This way it works same like send port. Use same filter in Orch receive shape.

    This way all failed messages arrive to this orch.

    Inside orchestration  read all messages and separate them based on Decide shape etc. Use additional properties of Error message like ErrorReport.FailureCode to make them unique. Give them different values for each type like for first assign, ErrorReport.FailureCode == "CtrlNumFailure" etc.

    After that (important here) use different send ports - likely two in your case. One for Control number error and other for all remaining. On each send port intialize co-relation and configure co-relation properties as ErrorReport.FailureCode (you can also add more fieds to use in filters). Co-relations are used to easily achieve property promotion using Orchestrations.

    After that on Send ports use filter for these properties.

    Thanks

    Tuesday, September 16, 2014 2:20 AM