The BPEL specification defines a finite set of activities. One of the options is to define our own functional activity via the Java Embedding activity. With the Java Embedding activity we can define any behavior in Java programming language. The Java Embedding activity can be used when we have some Java code that performs some small scale task, while we don't want to develop the complete solution as the Java application.
Tip
Note that Java Embedding is not defined by the BPEL specification. Rather, it is defined as the Oracle BPEL extension. Use this precaution when migrating the BPEL processes between different BPEL servers, as it may lead to incompatibility issues.
Inside the Java Embedding activity, we can use standard Java classes, methods exposed by the BPEL environment, and user defined extension classes. We will see this in this chapter. We can call it a session EJB3 bean.
From inside the Java Embedding activity we can access BPEL process variables. With an appropriate method...