Reply component on synchronous BPEL process in Oracle SOA

if there any possibility for returning the result to the client in the middle of a synchronous BPEL process?

I put the reply component in the middle of BPEL process, but the client still will wait for the whole process completed. I am wondering how the reply mechanism works in BPEL for synchronous.

Yes, you can place Reply activity and do some other activities after it.

But you have to place Wait activity after Reply to force BPEL engine to actually send the reply message.

Also the Wait activity has to be configured to wait for 3 seconds minimum or the value of MinBPELWait property in the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control. Otherwise the server will ignore it.

see: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_events.htm#SOASE516

Introduction to Interaction Patterns in a BPEL Process, When the BPEL process service component is on the service side of a synchronous transaction, it needs a receive activity to accept the incoming request, and a reply activity to return either the requested information or an error message (a fault; f1 in Figure 6-2) defined in the WSDL. Defines the location and the role of the web services with which the BPEL process service component connects to perform tasks, and the variables used to carry information between the web service and the BPEL process service component. A partner link is required for each web service that the BPEL process service component calls.

You can have the reply activity anywhere you want to send the response back to the client. Whatever the activities after the reply activity get executed as expected.

One thing you need to make sure is that, only one reply activity can be there for the respective receive activity.

Invoking a Synchronous Web Service from a BPEL , When the BPEL process service component is on the service side of a synchronous transaction, it needs a receive activity to accept the incoming request, and a reply activity to return either the requested information or an error message (a fault; f1 in Figure 5-2) defined in the WSDL. Calling a One-Way Mediator with a Synchronous BPEL Process You can expose a synchronous interface in the front end while using an asynchronous callback in the back end to simulate a synchronous reply.

Instead of wait, you can use a dehydrate activity. The concept is that unless the transaction completes, bpel doesn't reply, so you basically need to end the transaction where you use a reply activity. To do that you have to commit the transaction, so that new transaction can begin.

Note: using a wait would slow your bpel process.

Reply component on synchronous BPEL process in Oracle SOA , patterns between a BPEL process service component and an external service, and asynchronous interactions, one request - multiple and single responses, one Fusion Middleware Developing SOA Applications with Oracle SOA Suite. Synchronous BPEL Process Tutorial. A Synchronous BPEL Process is one which you call and wait for the reply before proceeding further. This is used in real time processing of services. Anil has done an excellent job in making us create a HelloWorld. I have created a similar HelloWorld for our use. We will call the same HelloWorld process created

in your composite.xml try modifying below properties of your synchronous bpel component, it should be working with out adding dehydration or wait and there should be no wait at client call.

bpel.config.transaction = required
bpel.config.oneWayDeliveryPolicy=async.persist

BPEL SOA 11g -'Synchronous' vs ' Asynchronous' processes , Section 8.3, "Calling a One-Way Mediator with a Synchronous BPEL Process" In the SOA Composite Editor, when you drag a Web Service from the Component Palette into the In the Oracle BPEL Designer, when you drag a Partner Link (​Web If the BPEL process service component does not receive a reply within the​  In the SOA composite application in the SOA Composite Editor, double-click the BPEL process service component (for this example, the component is named LoanBroker). Oracle BPEL Designer appears. In the Components window, expand BPEL Constructs .

Your best bet would be to add a dehydrate activity after your reply, this will force BPEL to complete the transaction then start a new one.

Fusion Middleware Developing SOA Applications with Oracle SOA Suite If the BPEL process service component does not receive a reply within the specified  8.2 Invoking a Synchronous Web Service. This section examines a synchronous invocation operation using the OrderProcessor.bpel file in the WebLogic Fusion Order Demo application as an example. For a more step-by-step approach, see Oracle Fusion Middleware Tutorial for Running and Building an Application with Oracle SOA Suite.

Fusion Middleware Developer's Guide for Oracle SOA Suite port type that both initiates the synchronous process and calls back the client with the response. Till that time BPEL process need to wait for indefinite amount of time. If Sync BPEL process will be used in the above case then the BPEL process will time out and that will come under faulted state. 3.When we can create empty bpel process Define Service Later: Select to create an empty BPEL process service component with no activities.

Yes, you can place Reply activity and do some other activities after it. But you have to place Wait activity after Reply to force BPEL engine to  SOA-BPEL 4 In this chapter, we will learn about the different activities that make up the building blocks The building blocks of a BPEL process service component. Oracle BPEL Designer includes a set of activities that you drag into a BPEL process service component and double-click an activity to define its attributes and property values.

if there any possibility for returning the result to the client in the middle of a synchronous BPEL process? I put the reply component in the middle of BPEL process  Once we have synchronous BPEL processes, the inbound adapter would automatically throttle itself since the adapter would be forced to wait for the downstream process to complete with a <reply> before processing the next file or message and so on.

Comments
  • The reply component does not terminate the process, for that you need a terminate component. basically the client should get the reply as soon as it occurs. can you describe your process ?
  • but if I use the terminate component the following activities will not execute, right? I just want reply a result to client first, then continue the other activities.
  • then don't put the terminate component... Try this: create a new sync process, add an asign component to copy some value to the output variable, add a wait component for 1 minute after the reply component and then initiate it from the console. You'll see that you get the reply as soon as it occurs, but if you'll check the flow screen - it's still running