locked
Not able to track all exception occurred in loop RRS feed

  • Question

  • Hi,

    1.  I am having orchestration with exception handling which will log the error in the esb.
    2.  I am able to track the exception also.
    3.  But if I am having exception for 10 records (In loop) then it is catching for only initial 05 records only .

    Note:
    I am using ESB toolkit 2.1

    Query: i am not able to track the exception for the remaining records in the loop  , Please suggest how can I resolve this problem 

    Thanks

    John

    Monday, November 14, 2016 4:41 AM

All replies

  • Hi John,

    The behavior should not be like that, if it is catching exception for 5 records, then it should catch the execptions for the remaining records, what kind of exception are you catching also can you please confirm that the last 5 records threw exceptions??

    Regards


    Mandar Dharmadhikari

    Monday, November 14, 2016 6:13 AM
    Moderator
  • Hi Mandar,

    Thanks for the reply !

    • it is catching exception for the initial 05 records (highlighted with time span below) as you can see below in the table.
    • In the highlighted lines it is the  exception retrieved and got updated in the table.
    • But after that exception was not received for the other looped records.
    • orchestration stayed in "ACTIVE" state only .


    Below is the code that i am using in message assignment shape to construct ESB Fault message:-

    msgESBFault = Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.CreateFaultMessage();
    msgESBFault.parameters.FailureCategory = "Terminal";
    msgESBFault.parameters.Scope = "ScopeException";
    msgESBFault.parameters.FaultSeverity = Microsoft.Practices.ESB.ExceptionHandling.FaultSeverity.Error;
    msgESBFault.parameters.FaultDescription = ex.ToString();

    Monday, November 14, 2016 7:19 AM
  • HI John,

    But did the last 5 records threw the same exception which you have caught???

    Regards,


    Mandar Dharmadhikari

    Monday, November 14, 2016 7:24 AM
    Moderator
  • Yes,

    All the 05 records threw the same exception as the Serial Number was not found for the same . So it threw exception.

    Monday, November 14, 2016 7:29 AM
  • HiJohn,

    If possible can you explain a bit in detail about this particular exception you are catching, and the ORchestration Design for this in Pic Format??

    Regards,


    Mandar Dharmadhikari

    Monday, November 14, 2016 7:33 AM
    Moderator
  • Hi John,

    Can you please put in more context to this. A orch screen shot may be.

    From what it looks is that your other 5 looped records are not getting the execution intended. You see that the orch is in active state . Why is it ? Have you debugged it to see why its in active. What is it that you are doing in orch that you are expecting an exception ? Are u sending or cheking things against a DB using LOB send port / a webservice call etc etc?

    Please explain the full picture for us to understand better.


    Pi_xel_xar

    Blog: My Blog

    BizTalkApplicationDeploymentTool: BizTalk Application Deployment Tool/

    Monday, November 14, 2016 8:09 AM
    Answerer
  • Hi Mandar,

    • I am using Solicit Request-Response port which will send the request for Activation.
    • if there is some exception in the response then it will be followed by the fault message and will be updated in the table.
    • here In my scenario Exception is occurring because my Input consists of "Serial Number" that does not exists.
    • So when i am sending request then it is giving exception .
    • But the exception is been received for only 05 initial records in the loop .
    • Like wise it should throw error for the remaining other records also but it is not throwing for them.
    • Apart from that Orchestration just stays in the "ACTIVE" mode


    Monday, November 14, 2016 8:09 AM
  • Have u checked for all ur 10 records the response using SoapUI or some other service test tool. ?

    The scenario suggests that the service throws a soap exception when serial number does not exists and not a failed business response ?

    Try to test the calls using SOAPUI and see if you can find any difference in the responses for all ur 10 records. 

    Orch staying in active suggests ur orch is not getting completed. Did u notice any thing the event vwr ?


    Pi_xel_xar

    Blog: My Blog

    BizTalkApplicationDeploymentTool: BizTalk Application Deployment Tool/

    Monday, November 14, 2016 8:19 AM
    Answerer
  • Hi,

    Yes all my 10 records showing the same result Serial Number" that does not exists.
    Monday, November 14, 2016 8:38 AM
  • Hi John,

    I wonder whether a 6th response is even coming back. Or what is in it. Maybe something else goes wrong with the 6th response?

    To get more insight in this, I would suggest adding some debug logging to the following shapes:

    - Extract Response

    - Get SoapException

    Then run the scenario again and see where the fault lies.


    Monday, November 14, 2016 8:42 AM
  • Yes all my 10 records showing the same result Serial Number" that does not exists.

    is this the response you get from the port to which you are sending data??

    Your exception block name suggests you are catching SOAP exception, So can you please ensure that the exception is thrown for all the records??

    Looks line exception is not thrown for few of the records

    Regards,


    Mandar Dharmadhikari

    Monday, November 14, 2016 9:19 AM
    Moderator
  • Hi Mandar,

    Yes this is the response that I received after sending the data.
    And this exception is thrown for all the records since the serial number they have does not exist in the request .So exception is thrown for only 05 records.

    Thanks

    John


    Monday, November 14, 2016 11:37 AM
  • Hi John,

    Unable to understand the issue here...when you say you response fropm the port, then how can it be considered as an exception??
    Regards


    Mandar Dharmadhikari

    Monday, November 14, 2016 11:46 AM
    Moderator
  • Hi Mandar,

    Request is sent -> And in response exception occurs (Serial Number Not exists)

    This exception is what I am saving in table.

    So for first 05 records it is getting updated in table

    But for rest 05 records it is not getting updated in the table.

    Note: It should throw exception for all the 10 records as Serial Number does not exists for them.

    Monday, November 14, 2016 11:57 AM
  • Where is the Loop?

    The image you shared above does not have a Loop Shape.

    Monday, November 14, 2016 1:51 PM
    Moderator
  • HI John,

    Is this some custom exception???

    Also How are you making 10 different calls??

    Can you ensure that there are 10 calls and 10 exceptions are thrown??

    Regards


    Mandar Dharmadhikari

    Monday, November 14, 2016 2:46 PM
    Moderator