none
failed response from web service for child orch RRS feed

  • Question

  • I am using scatter gather pattern to call web service..

    1 . I am receiving a envelope message.

    2.  I am debatching a envelope message by executing a xml pipeline in orchestration.

    3. calling a child orchestration for each debatched message using start orchestration and self correlating port.

    3. calling a web service for each debatched message in my child orchestration and returning the response to the caller.

    4. aggregate the response message and sent it back to the user.

    My question is there any way so that if my child orchestration failed for even one of the debatched message i get the error response and send it to the user without continuing any further process.  


    • Edited by sriaug Friday, May 20, 2016 3:19 PM
    Friday, May 20, 2016 3:19 PM

Answers

  • How about creating a canonical envelope that contains two child records - Error and Payload. Payload section can contain two records - request(for input msg to child orch) and response(for output msg from child orch). The Error record can contain fields like isError, ErrorDetails etc.

    From your parent, send Envelope message that contains Envelope.Payload.request populated. In your child, extract Payload.Request, call your web service and populate web service response in Envelope.Payload.Response. In case of error in calling the service, populate Envelope.Error fields. Send back Envelope message.

    Now back in parent, first inspect if Envelope.Error.isError is set. If yes, read Error record details, create a Fault message from it and send back Fault response to client.


    Thanks Arindam






    Saturday, May 21, 2016 6:21 AM
    Moderator

All replies

  • Hi Sri,

    While calling child orchetration from parent orchestration you can pass one boolen parame(Out param-By value ) to check error occurred in child orchestration or not.

    In the parent orchestration you need to check the value of the boolean param and it is true then something went wrong in child orchestration and u can kill the main orchetration with out sending any response. or u can send custom fault to the caller 

    Please mark it as answer if it helped u.

    Saturday, May 21, 2016 4:48 AM
  • I am calling other orchestration using Start orchestration shape so I cant use out param.
    Saturday, May 21, 2016 5:58 AM
  • How about creating a canonical envelope that contains two child records - Error and Payload. Payload section can contain two records - request(for input msg to child orch) and response(for output msg from child orch). The Error record can contain fields like isError, ErrorDetails etc.

    From your parent, send Envelope message that contains Envelope.Payload.request populated. In your child, extract Payload.Request, call your web service and populate web service response in Envelope.Payload.Response. In case of error in calling the service, populate Envelope.Error fields. Send back Envelope message.

    Now back in parent, first inspect if Envelope.Error.isError is set. If yes, read Error record details, create a Fault message from it and send back Fault response to client.


    Thanks Arindam






    Saturday, May 21, 2016 6:21 AM
    Moderator