The Switch_EvaluateCCResult switch activity in

Invoking a Synchronous Web Service from a BPEL Process 7-5 In this example, the portType CreditAuthorizationPort receives the credit card type, credit card number, and purchase amount, and returns the status results. Example 7–3 provides an example of partnerLinkType and portType. Example 7–3 partnerLinkType and portType Definitions plnk:partnerLinkType name=CreditCardAuthorizationService plnk:role name=CreditAuthorizationPort plnk:portType name=tns:CreditAuthorizationPort plnk:role plnk:partnerLinkType

7.2.2.3 Invoke Activity for Performing a Request

The invoke activity includes the lCreditCardInput local input variable. The credit card authorization web service uses the lCreditCardInput input variable. This variable contains the customer’s credit card type, credit card number, and purchase amount. The lCreditCardOutput variable returns status results from the CreditAuthorizationService service. Example 7–4 provides an example. Example 7–4 Invoke Activity invoke name=InvokeCheckCreditCard inputVariable=lCreditCardInput outputVariable=lCreditCardOutput partnerLink=CreditCardAuthorizationService portType=ns2:CreditAuthorizationPort operation=AuthorizeCredit

7.2.2.4 Synchronous Invocation in BPEL Code

The BPEL code shown in Example 7–5 performs the synchronous invocation: Example 7–5 Synchronous Invocation assign name=Assign_CreditCheckInput copy from variable=gOrderInfoVariable query=ns4:orderInfoVOSDOns4:OrderTotal to variable=lCreditCardInput part=Authorization query=ns8:AuthInformationns8:PurchaseAmount copy copy from variable=gOrderInfoVariable query=ns4:orderInfoVOSDOns4:CardTypeCode to variable=lCreditCardInput part=Authorization query=ns8:AuthInformationns8:CCType copy copy from variable=gOrderInfoVariable query=ns4:orderInfoVOSDOns4:AccountNumber to variable=lCreditCardInput part=Authorization query=ns8:AuthInformationns8:CCNumber copy assign invoke name=InvokeCheckCreditCard inputVariable=lCreditCardInput outputVariable=lCreditCardOutput partnerLink=CreditCardAuthorizationService 7-6 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite portType=ns2:CreditAuthorizationPort operation=AuthorizeCredit

7.3 Specifying Timeout Values

You can specify timeout values with the property SyncMaxWaitTime in the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control. This property defines the maximum time a request and response operation takes before timing out. If the BPEL process service component does not receive a reply within the specified time, then the activity fails.

7.3.1 How To Specify Timeout Values

To specify timeout values: 1. Log in to Oracle Enterprise Manager Fusion Middleware Control.

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

Properties .

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

Configuration Properties .

4. Click SyncMaxWaitTime.

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

6. Click Apply.

7. Click Return.

7.3.2 What You May Need to Know About SyncMaxWaitTime and Synchronous Requests Not Timing Out

The SyncMaxWaitTime property applies to durable processes that are called in an asynchronous manner. Assume you have a BPEL process with the definition shown in Example 7–6 . The process is not durable because there are no breakpoint activities. Example 7–6 Process with No Breakpoint Activities receive name=receiveInput partnerLink=client variable=input createInstance=yes assign ... assign reply name=replyOutput partnerLink=client variable=output If a Java client or another BPEL process calls this process, the assign activity is performed and the reply activity sets the output message into a HashMap for the client actually the delivery service to retrieve. Since the reply is the last activity, the thread returns to the client side and tries to pick up the reply message. Since the reply message was previously inserted, the client does not wait and returns with the reply. Assume you have a BPEL process with a breakpoint activity, as shown in Example 7–7 . Example 7–7 Process with Breakpoint Activities receive name=receiveInput partnerLink=client variable=input