Setting the BPEL process variables
This recipe explains how to send the data to the BPEL process variable.
Getting ready
In order to complete the recipe, we will update the BPEL_and_Java_1_1
process schema (BPEL_and_Java_1_1.xsd
). The new element in the response message is clientResponseMsg
:
<element name="processResponse">
<complexType>
<sequence>
<element name="resultFmtBPEL" type="string"/>
<element name="resultFmtJava" type="string"/>
<element name="clientResponseMsg" type="string"/>
</sequence>
</complexType>
</element>
The newly defined element will be used to return the changed input message to the client.
How to do it…
Open the BPEL_and_Java_1_1
process and insert the Java Embedding activity (SetVar
).
Double-click on the SetVar
activity to insert a code snippet.
First we read the input data:
String input_txt_from_var= (String)getVariableData("Input_Txt_Var");
In the next step we will reverse the input text...