Setting a Timeout for a WebService invocation in BPEL

1. Given a process that invokes a Local or Remote WebService, we want to set a timeout of 10 seconds that the BPEL will wait for the answer. If no response is received within the specified timeout, we want to perform a series of activities (eg. WebService not available, end the BPEL process, etc). "WS_Call" is the Invoke operation on the WebService.

2. In the Sequence where "WS_Call" Invoke activity, add a Catch branch :

and set it's properties to catch a RemoteFault. We need to Catch a RemoteFault because this is the type of fault that the "timeout" we are setting in next step will throw when the timeout will expire:

In the Catch branch you can process the error : Terminate the process, insert a Reply/Response to return from the Bpel, make some Assign activity and then continue the Bpel, etc.

3. Set the property "timeout" for the PartnerLink to 10 seconds .
This specifies the number of Seconds to wait until expire. A remote fault is thrown if this happens.

and if the WebService is on the SAME host as the BPEL you also need to set the property "optSoapShortcut" to FALSE.
You need this to FALSE to force local SOAP request to go through SOAP instead of internal calls.

This final step can be directly configured in bpel.xml in partnerLinkBinding section:

Now if the WebService invocation takes more than 10 sec, it should throw a RemoteFault that will be catched in the Catch branch that we built.

Posted in Labels: , | 0 comments

Dynamic FTP Adapter in SOA 10.1.3

The Outbound dynamic configuration is supported via JCA dynamic partnerlinks. There are 2 possible scenarios for this (which are described in detail in Oracle SOA tutorial 140.AdapterFramework\DynamicPartnerlinks) :

a) the dynamic part is the jca:address location attribute

<jca:address location="eis/ftp/anonymous">

The BPEL process can decide which JCA Connection Factory (JNDI entry) to use. The dynamically chosen JNDI name at runtime must already be defined in oc4j-ra.xml .

b) the dynamic part are the JCA connection properties:

<jca:address ManagedConnectionFactory="oracle.tip.adapter.ftp.FTPManagedConnectionFactory"

where the dynamic attributes include Host, Port, Username and Password. Then attribute ManagedConnectionFactory is not changeable. This solution is independent of the existence of any oc4j-ra.xml defined connection factory locations.

For the Inbound synchronous read the solution is t
o use the synchronous read operations available for the adapter.

Posted in Labels: , | 0 comments

What is this blog about ?

Technical information about Oracle SOA Suite with focus on following subjects

- BPEL - Business Process Execution Language
- ESB - Enterprise Service Bus
- JDeveloper
- AS - Application Server

Posted in Labels: | 0 comments