How to Use bpelx:exec Built-in Methods

13-6 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite automatically connects the BPEL process to an inbound SOAP service binding component. 3. Import the Oracle ADF Business Component service WSDL into the SOA composite application. 4. Create a web service binding to the Oracle ADF Business Component service interface. 5. Design a BPEL process in which you perform the following tasks: a. Create a partner link for the Oracle ADF Business Component service portType. b. Create an assign activity. For this example, this step copies data for example, a static XML fragment into a variable that is passed to the Oracle ADF Business Component service. c. Create an invoke activity and connect to the partner link you created in Step 5a. 6. Connect wire the partner link reference to the composite reference binding component. This reference uses a web service binding to enable the Oracle ADF Business Component service to be remotely deployed. 7. Deploy the SOA application. 8. Invoke the SOA application from the Test Web Service page in Oracle Enterprise Manager Fusion Middleware Control. For more information on creating Oracle ADF Business Components, see Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. For more information on invoking a SOA composite application, see Oracle Fusion Middleware Administrators Guide for Oracle SOA Suite and Oracle BPM Suite.

13.3 Adding Custom Classes and JAR Files

You can add custom classes and JAR files to a SOA composite application. A SOA extension library for adding extension classes and JARs to a SOA composite application is available in the ORACLE_HOMEsoamodulesoracle.soa.ext_ 11.1.1 directory. For Oracle JDeveloper, custom classes and JARs are added to the application_name projectsca-inflib directory.

13.3.1 How to Add Custom Classes and JAR Files

If the classes are used in bpelx:exec, you must also add the JARs with the BpelcClasspath property in the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control. To add JARs to BpelcClasspath: 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 BpelcClasspath.

4. In the Value field, specify the class path.

5. Click Apply.

Incorporating Java and Java EE Code in a BPEL Process 13-7

6. Click Return.

In addition, ensure that the JARs are loaded by the SOA composite application. To add custom classes: 1. Copy the classes to the classes directory. 2. Restart Oracle WebLogic Server. To add custom JARs: 1. Copy the JAR files to this directory or its subdirectory. 2. Run ant. 3. Restart Oracle WebLogic Server.

13.4 Using Java Embedding in a BPEL Process in Oracle JDeveloper

In Oracle JDeveloper, you can add the bpelx:exec activity and copy the code snippet into a dialog.

13.4.1 How To Use Java Embedding in a BPEL Process in Oracle JDeveloper

To use Java embedding in a BPEL process in Oracle JDeveloper: 1. From the Component Palette, expand Oracle Extensions. 2. Drag the Java Embedding activity into the designer. 3. Double-click the Java Embedding activity to display the Java Embedding dialog. 4. In the Name field, enter a name. 5. In the Code Snippet field, enter or cut and paste the Java code. Figure 13–1 provides details. Note: For custom classes, you must include any JAR files required for embedded Java code in the BpelcClasspath property in the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control. See Section 13.3.1, How to Add Custom Classes and JAR Files for instructions. The JAR files are then added to the class path of the BPEL loader. If multiple JAR files are included, they must be separated by a colon : on UNIX and a semicolon ; on Windows.