IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Business objects programming > Programming techniques > Create nested business objects

Use a nested business object defined by a wildcard

You can specify the type xsd:any in a parent object to specify a child object, but only if the child object already exists.

The setWithCreate function used to define nested business objects for single and multiple instances does not work if you are using a wildcard value of xsd:any in the Service Data Object. This is illustrated in the following example code:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:complexType name="Parent">
    <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
      <xsd:element name="child" type="xsd:anyType"/>
    </xsd:sequence>
  </xsd:complexType>

</xsd:schema>


Results

An exception will be thrown if the child data object does not exist.

Create nested business objects