Click the Timeout tab.

14-12 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite For example, if you specified an XPath expression to obtain a value for a timeout relative from when the activity is invoked, syntax similar to that shown in Example 14–7 can display. Example 14–7 XPath Expression bpelx:for=bpws:getVariableDatainputVariable,payload,tns:waitValuetns:for

14.4 Creating a Wait Activity to Set an Expiration Time

The wait activity allows a process to wait for a given time period or until a time limit has been reached. Exactly one of the expiration criteria must be specified. A typical use of this activity is to invoke an operation at a certain time. You typically enter an expression that is dependent on the state of a process. When specifying a time period for waiting, note the following: ■ Wait times cannot be guaranteed if they are scheduled with other events that require processing. Due to this additional processing, the actual wait time can be greater than the wait time specified in the BPEL process. ■ Wait times of less than two seconds are ignored by the server. Wait times above two seconds, but less than one minute, may not get executed in the exact, specified time. However, wait times in minutes do execute in the specified time. ■ The default value of 2 seconds for wait times is specified with the MinBPELWait property in the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control. You can set this property to any value and the wait delay is bypassed for any waits less than MinBPELWait.

14.4.1 How To Specify the Minimum Wait Time

You can specify the minimum time duration for a BPEL process to perform a wait that involves a dehydration. If the wait duration is less than or equal to the value, BPEL continues executing activities in the same thread and transaction.

1. From the SOA Infrastructure menu, select SOA Administration BPEL

Properties .

2. At the bottom of the BPEL Service Engine Properties page, click More BPEL

Configuration Properties .

3. Click MinBPELWait.

4. In the Value field, specify a value in seconds.

5. Click Apply.

6. Click Return.

14.4.2 How to Create a Wait Activity

To create a wait activity: 1. In the Component Palette, expand BPEL Constructs. Note: Quartz version 1.6 is supported for scheduling expiration events on wait 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