Invoking third-party libraries from BPEL 2.0 process
This recipe explains how to use third-party libraries from a BPEL 2.0 process. We achieve this by using the Java Embedding activity in the BPEL editor. In general, putting a lot of business processing code into the BPEL process does not represent a good practice. Rather, the third-party libraries should be implemented through web services or EJBs. Those web services and EJBs can then be referenced from the BPEL process.
Getting ready
We will amend the JDeveloper project from the Adding third-party libraries to JDeveloper projects recipe. We create an empty BPEL 2.0 process and leave the request and response messages unchanged.
How to do it…
To add the code for the third-party library from the Java Embedding activity, we perform the following steps:
Open the BPEL process in JDeveloper. To execute the third-party library class, select the Java Embedding activity from the Oracle Extensions section of Component Palette as shown in the following...