Invoking Java code from the BPEL process

This recipe explains how to use Java code in the BPEL process from within the Java Embedding activity.

Getting ready

For this recipe to complete, we will update the sample from the previous recipe. We will utilize the BPEL_and_Java_2_0 process in order to show how to invoke Java code from the Java Embedding activity. In this recipe, we will read the input date variable and with the help of the Java Embedding activity set the result to the output variable. The output variable will take the input date and calculate which day in week the date presents.

We also need to open the BPEL process schema (BPEL_and_Java_2_0.xsd). Inside the schema we modify the input and output message definition:

<element name="process"> ...

Get BPEL and Java Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.