locked
need Architectural help.. RRS feed

  • General discussion

  • Hi

    I am exposing BizTalk Schema as SOAP service to front end application.

    Front end calls the BizTalk Service- BizTalk calls the Down Stream SQL and gets the data and post it to Front End.

    The Above solution i have implemented as messaging scenario only.

    Everything is working fine-But in case of any exceptions occur at map level or Down Stream application level

    BizTalk need to send custom error message(with some of the properties from Actual exceptions) to the front end.

    i am thinking to implement WCF service behavior extension in BeforeSendReply() method--

                        I will check Reply Type is fault message or not,if it is fault mesaage  i will prepare custom exception message with some of the properties from the actual exception and send that as reply.

    Can you any one suggest this is good approach,if not what is the best approach.

    Thanks&Regards

    Ammu.

    Friday, November 20, 2015 5:19 PM

All replies

  • Ammu,

    What I have done before in this scenario is:

    1 - Enable routing for failed messages in the send port:

    

    2 - Have either an orchestration or a send port (to keep it messaging only) filtering by message type and picking up the exception message. From there you can do whatever you need with it, including sending it to your front end app. If you need to send a custom message, create a flat file schema and map from the error message to the flat file before you send it out.

    This keeps the solution within the BizTalk realm and helps with "Separation-Of-Concern"

    Friday, November 20, 2015 6:36 PM
  • The correct and best way to handle this is with an Orchestration.

    There is nothing wrong using Orchestrations, don't worry about 'performance'.

    In the Orchestration, you can very easily handle all error cases and prepare any custom response necessary.

    Friday, November 20, 2015 6:52 PM
    Moderator
  • Thanks Feijo for quick response.

    If enable routing for failed message,BizTalk will prepare Error message and publishes to the message Box.

    But my scenario is requst-Response scenario(Real time).

    When BizTalk receives a request on two way receive port on the same port i need to send response.



    Friday, November 20, 2015 6:53 PM
  • I dont want to use orchestration in this case.

    Please provide me the approach in messaging scenario only.

    Friday, November 20, 2015 6:58 PM
  • Ammu,

    John is right, this is the perfect scenario to use an orchestration. I choose message based as much as I can but error handling is a good case for a litle orchestration.

    Continuing to explore your messaging only approach, this article uses WCF-Custom Adapter with Behavior Extension to do something similar:

    Invoke ReSTful Web Services with BizTalk Server 2010

    Have you tried that route?

    Friday, November 20, 2015 9:56 PM
  • I dont want to use orchestration in this case.

    Can you provide some details?  We'd be happy to address any concerns you have.

    Given that an Orchestration is the best solution for this, I will stand by my recommendation.

    Friday, November 20, 2015 10:15 PM
    Moderator
  • Hi ammu4biz,

    I have already answered to your question in one of the earlier threads. Please let me know whether you tried the approach i explained or not

    https://social.msdn.microsoft.com/Forums/en-US/9a1564ed-3f35-43df-9d0f-b2c2b765f14d/faultcontracts-when-expsoing-biztalk-process-as-wcf-rest-services?forum=biztalkgeneral

    Thanks


    JB

    Saturday, November 21, 2015 4:52 AM
  • Hi,

    I would use an orchestration to have more control over handling an error and agree with John. With a custom behaviour you increase lead time and that approach will be tedious. You could leverage the ESB toolkit exception management framework in case you looking for a resuable out-of the box solution.

    Cheers,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly



    BizTalk

    Sunday, November 22, 2015 12:04 PM
    Moderator
  • This is how I would do it as well.  The minimal cost to adding an orchestration in this case trumps building custom wcf behaviours from both a build and maintenance perspective

    http://kentweare.blogspot.com

    Sunday, November 22, 2015 2:57 PM
    Answerer
  • Hi Ammu,

    Kent Weare and Steef-Jan  along with Boatseller has given you correct  answer to your Question to use Orchestration for robust exception handling with minimal maintenance to your solution .

    These are the key parameters which you should consider while designing your solution . 

    Thanks Kent and Steef-Jan for your valuable contribution .

    regards

    Abhishek



    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Sunday, November 22, 2015 7:22 PM
  • Hi ammu4biz,

    The approch i mentioned in the earlier reply works and I implemented in my current projects with pure messaging only scenario. I agree with everyone here that using orchestration is easy.

    So it is up to you to make a decision with these two approaches

    1. If you are challenged and prepared to write some exciting stuff then you can try the approach i mentioned in the earlier reply and it is working for me

    2. Otherwise use the easy way which is orchestration.

    Thanks

    JB


    JB

    Sunday, November 22, 2015 9:14 PM
  • Hi Steef,

    Thanks a lot for your response.

    Sunday, November 22, 2015 9:23 PM