What Happens When You Set Timeouts for Request-Response Operations in Receive Activities

Using Events and Timeouts in BPEL Processes 14-13

2. Drag a Wait activity into the designer.

3. Double-click the Wait activity to display the Wait dialog.

4. In the For section, enter the amount of time for which to wait.

5. In the Until section, select the deadline for which to wait, as shown in

Figure 14–7 . Figure 14–7 Wait Dialog

14.4.3 What Happens When You Create a Wait Activity

Exactly one of the expiration criteria must be specified, as shown in Example 14–8 . Example 14–8 Wait Activity wait for=duration-expr | until=deadline-expr standard-attributes standard-elements wait

14.5 Specifying Events to Wait for Message Arrival with an OnEvent Branch in BPEL 2.0

You can create an onEvent branch in a scope activity that causes a specified event to wait for a message to arrive. For example, assume you have a credit request process that is initiated by a customer’s credit request message. The request may be completely processed without the need for further interaction, and the results submitted to the customer. In some cases, however, the customer may want to inquire about the status of the credit request, modify the request content, or cancel the request entirely while it is being processed. You cannot expect these interactions to occur only at specific points in the business order processing. An event handler such as an onEvent branch enables the business process to accept requests such as status request, modification request, or cancellation request to arrive in parallel to the primary business logic flow. The onEvent event handlers are associated with an enclosed scope. The onEvent event handlers are enabled when their scope is initialized and disabled when their scope 14-14 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite ends. When enabled, any number of events can occur. They are processed in parallel to the scope’s primary activity and in parallel to each other. Message events also represent services operations exposed by a process and modeled as onEvent elements. Event handlers cannot create new process instances. Therefore, message events are always received by a process instance that is already active.

14.5.1 How to Create an onEvent Branch in a Scope Activity

To create an onEvent branch in a scope activity: 1. In the expanded Scope activity, click Add OnEvent, as shown in Figure 14–8 . Figure 14–8 Add OnEvent Icon This creates an OnEvent branch and an enclosed scope activity. 2. Double-click the OnEvent branch. The OnEvent dialog is displayed, as shown in Figure 14–9 . Figure 14–9 OnEvent Dialog

3. In the Partner Link field, click the Search icon to select the partner link that

contains the endpoint reference on which the message is expected to arrive. The Port Type and Operation fields define the port type and operation invoked by the partner to cause the event.