Wednesday, February 13, 2013

BPM: how to time out synchronous calls to external services?

In the Oracle SOA Suite for calls to synchronous services the maximum time a composite should wait for a service to respond, can be set using the SyncMaxWaitTime (which has a default of 45 seconds). For services deployed on the same engine, this also works for the BPM Suite.

However, for the BPM Suite 11.1.1.6 (PS5), and probably all versions before that, this property is ignored for calls to external services (that is, not being deployed on the same engine). A BPMNConfig specific version of this property is not present (yet?).

A work-around is to set the oracle.webservices.httpReadTimeout binding property on each specific reference of the composite.xml, as shown in the picture below. The weblogic.wsee.wsat.transaction.flowOption comes automatically with that.


It is a bit more work, as you have to do that for each individual reference. On the other hand, this gives you the opportunity to set it for one reference different than for another one.

As a matter of fact you don't even have to set these properties design-time. By navigating to the deployed composite, and then go to the Service/Reference Properties, you will see that you can set this property run-time as well. I haven't checked (yet) if you do both which one will prevail. I would guess the run-time one.

Related property is oracle.soa.local.optimization.force, which can be set to false to force that the SOA Suite will not optimize service calls by using Java-level calls, but instead use the SOAP stack. This property is not necessary to set for external references, as for that it will always use SOAP. However, you can use it if you want to set it for services calls within the same SOA server.

Another property is the oracle.webservices.httpConnTimeout which can be used to configure the maximum time the composite should wait to connect to the service. You don't have to set that to time out waiting for the response.

Interesting reading regarding Oracle Fusion Middleware timeout settings it a recent posting from Manish Kumar Gupta.

No comments: