Dynamic indexing of the variables

In situations where we have information in a list of the same elements, it is not possible to access a variable by name. Rather, we use indexing to access the variable data from a list.

Getting ready

We will examine dynamic indexing of the variables in the Manipulate1_1 BPEL process from the Assigning date or time to the variables recipe.

First, let's extend the BPEL process by defining a new element in the Manipulate1_1 schema file as follows:

<element name = "ChildrenElementType">
  <complexType>
    <sequence>
      <element name = "child" type = "string" minOccurs = "1" maxOccurs = "unbounded"/>
    </sequence>
  </complexType>
</element>

The Element-type variable is defined as an array of the <child> strings.

Also, we modify the ...

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.