Click OK. How To Create a Pick Activity

Using Events and Timeouts in BPEL Processes 14-7 Both operations have the same input message type and correlation is defined with initiate set to join. The expectation is that the processMessage1 invocation is invoked immediately and the BPEL process B instance is created, which should sleep for ten seconds. After five seconds, the invoking process should then post the processMessage2 invocation to BPEL process B and this invocation should go to the already existing instance instead of creating a new one since the correlation ID is the same and initiate is set to join. However, for each invocation, a new instance of BPEL process B is created and the result cannot be predicted. ■ If the processMessage2 operation branch finishes first, then the subsequent assign operation fails because the input variable from processMessage1 is assumed to be null for that instance. ■ If the processMessage1 operation branch finishes first, then the process returns callback data with only partial information does not include the input from processMessage2. In Oracle BPEL Process Manager’s implementation, either one of the two operations processMessage1 or processMessage2 creates a new instance. This is implemented so that database queries do not need to be made to see if there are already instances created. The workaround is to create two processes that are initiated by the two different operations.

14.3 Setting Timeouts for Request-Response Operations in Receive Activities

You can provide a timeout setting for request-response operations in receive activities. This provides an alternative to using the onMessage and onAlarm branches of a pick activity to specify a timeout duration for partner callbacks. The following sections provide an overview of this functionality: ■ Timeout settings relative from activity invocation ■ Timeout settings as an absolute date time ■ Timeout settings computed dynamically with an XPath expression ■ bpelx:timeout fault thrown during an activity timeout ■ Events added to the BPEL instance audit trail during an activity timeout ■ Recoverable timeout activities during a server restart

14.3.1 Timeout Settings Relative from When the Activity is Invoked

You can specify a timeout setting relative from when the activity is invoked. This setting is specified as a relative duration using the syntax shown in Example 14–2 . Example 14–2 Timeout Settings Relative from When the Activity is Invoked receive | bpelx:for=duration-expr Note: The timeout setting for request-response operations is not available in BPEL projects that support BPEL version 2.0.