- BPEL Tutorial
- BPEL - Home
- BPEL - Introduction
- BPEL - Activities
- Partner Link in BPEL Process
- Creating a Partner Link
- BPEL - Adapters
- Process Monitors
- One-Way Messages
- Synchronous Interactions
- Asynchronous Interactions
- Asynchronous Interactions with a Timeout
- Asynchronous Interactions with a Notification Timer
- One Request, Multiple Responses
- One Request, One of Two Possible Responses
- One Request, a Mandatory Response, & an Optional Response
- Partial Processing
- Multiple Application Interactions
- Invoking a Synchronous Web Service
- Invoking an Asynchronous Web Service
- Using Parallel Flow
- Using Conditional Branching
- Using Fault Handling
- Resubmitting a Faulted Process
- Incorporating Java & Java EE Code
- Manipulating XML Data
- Using Correlation Sets & Message Aggregation
- Using Events & Timeouts in BPEL Processes
- Using the Notification Service
- Using Oracle BPEL Process Manager Sensors
- Difference between BPEL 1.1 & BPEL 2.0
- BPEL Useful Resources
- BPEL - Quick Guide
- BPEL - Useful Resources
- BPEL - Discussion
BPEL - Incorporating Java & Java EE Code
There are several methods for incorporating Java and Java EE code in BPEL processes. Following are a few important methods −
Wrap as a Simple Object Access Protocol (SOAP) service
Embed Java code snippets into a BPEL process with the bpelx − exec tag
Use an XML facade to simplify DOM manipulation
Use bpelx − exec built-in methods
Use Java code wrapped in a service interface
The Java Embedding activity allows us to add activities in a BPEL process. We can write a Java snippet using standard JDK libraries, the BPEL APIs, custom and 3rd party Java Classes included in JAR files in deployed SCA composites (in SCA-INF/lib directory) and Java Classes and libraries available on the Classpath for the SOA Suite run time.
Java Embedding means functionality hidden inside, in a not very decoupled way. The Java code is hard to maintain. By embedding Java in BPEL (XML driven), we start mixing technology, that require different skills as well as expensive XML to Java Object marshalling and unmarshalling.
The best use cases for Java Embedding seems to be for advanced logging/tracing or for special validations/transformations. However, not to replace built in capabilities of the BPEL engine as well as the other components in SOA Suite 11g and the adapters that come with it.