Initializing a variable with an XML literal

During the initialization phase, the variable receives its initial XML content. This content can be subject to various manipulations during the BPEL process flow. We are able to instantly assign the content of the variable if the source of the data already exists. This recipe explains how to initialize a variable with the XML content.

Getting ready

We create a new synchronous BPEL process (VarInit.bpel). We modify the request and response messages. The request message has the following schema:

<element name = "process">
  <complexType>
    <sequence>
      <element name = "name" type = "string"/>
      <element name = "birthYear" type = "int"/>
    </sequence>
  </complexType>
</element>

We need to provide the name and year of ...

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.