guaranteed Web service

Hi,

i’m invoking a web service in a specified step in my flow service, but i need to guarantee that my flow doesn’t continue the processing until the web service connector get a successful answer from the web service.

I mean that my flow service has to wait until the web service returns a positive answer, this includes the case when the server hosting those WS is down.

is there any way to implement this logic ?

regards

Tim,

You can use REPEAT step with REPEAT on Failure and call your webservice inside this step.

Regards,
Mohan

Yes. As Mohan suggested you can use a REPEAT step in your flow service. Keep the REPEAT property as REPEAT on failure and inside your REPEAT step call the web-service connector and write your logic here.

We also implement the same logic for database if you trying to insert/update data to DB.

I am going to assume that in the case the web service provider that your Flow service is calling experiences a transient error, you desire to retry for a given amount of time. We do not want to retry for an indefinite amount of time. In addition, I will also assume that a user is not sitting in front of a monitor screen waiting for a response. In other words, this is not an interactive solution with a user sitting on the other end waiting for a response. This integration scenario is machine to machine.

If my assumptions are correct, then consider using a pub/sub integration pattern.

  1. Publish the message to a message queue (Broker).
  2. A Trigger service retrieves the message from Broker and attempts to submit it to the target Web Service.

In case of a transient failure calling the target web service, the trigger service and publishable document will handle the retry interval, sleep time, time-to-live and other stuff required to guarantee delivery of the message.

Hi,

thank you all for your replies.

both ideas are good (the Repeat service and the Broker/trigger) but it seems to me that the second one is more relevant since the first one doesn’t avoid the lost of our data if the IS shuts down while the flow service is in the ws connector step.

regards

you bet :smiley:

i rmg,

your smiley :smiley: would mean probably that my assumption will not be right :slight_smile:

i didn’t test this yet, but does the document in the broker stay there until the handling service in the trigger completes the processing successfully?

for instance, if the IS is suddenly down while the handling service is working on the retrieved broker document, is this one kept on the broker until the IS is on again and then reprocessed?

regards

Yes the document would stay on the Queue (unless the queue is Guranteed not Volatile) until it retrieves.

Did you check the client queue and make sure?

HTH,
RMG