Sidebar

How do I retry calling a Web service from a mapping node?

0 votes
537 views
asked Mar 30, 2016 by wendy-l-4419 (230 points)
I sometimes run into Read Timed Out and Connection Refused errors in a particular channel that attempts to call the CPS Web service for CCDAs. I've tried increasing the connection time out parameter in the Web service call to avoid the Read Timed Out error, but I would like to allow the channel to retry the Web service call if it times out or gets a connection refused for some reason. I've thought of using a try-catch for these specific errors to make additional Web service calls or pausing the channel and then reconnecting in case the Web service is temporarily down. I'm wondering what other methods there are and what would be the best way of handling this.

 

Thanks!

1 Answer

0 votes

If the endpoint regularly times out, but a second attempt goes through, you can code around that as you are describing using a try-catch, try again approach.  If it is a particular patient CDA that is timing out, you could increase the timeout for the call.

Sometimes an endpoint goes down, which causes timeouts and connection refused errors until the endpoint comes up. In this situation, you can suspend the channel for a period of time when you begin to notice this behavior.

Go to the Channel Properties for your channel. (Double clicking on the Channel name or select Properties from the right-click menu)

In the Error Management tab, you can temporarily stop the channel channel when you have consecutive errors.  The configuration below will stop the channel after two erred messages.  The channel will be automatically restarted after 5 minutes.

 

answered Mar 31, 2016 by mike-r-7535 (13,650 points)
commented Mar 31, 2016 by wendy-l-4419 (230 points)
Since the channel is an HTTP listener, when it's temporarily stopped, it's not able to receive any requests correct?
commented Mar 31, 2016 by mike-r-7535 (13,650 points)
While the channel is down, it is not receiving new requests.  So, for your channel, I would suggest making the time-out longer.  Is this part of a reconcile form?
...