Integration Platform Technologies: Siebel Enterprise Application Integration > EAI UI Data Adapter Business Service > EAI UI Data Adapter Business Service Methods >

InsertLeaves Method


Use InsertLeaves to insert records into the Siebel database. When InsertLeaves is called on an integration object hierarchy, the EAI UI Data Adapter inserts leaf nodes only and uses internal nodes for maintaining parent-child relationships:

  • Internal Nodes. All internal nodes must already exist in the database and Row Id must be specified (Row Id is the implicit, hard-coded user key used by the EAI UI Data Adapter). If the internal node does not exist or Row Id is not specified, the EAI UI Data Adapter returns an error. For more information about user keys, see About the EAI UI Data Adapter Business Service.
  • Leaf Nodes. Whether or not Row Id must be specified for leaf nodes depends on the type of integration component:
    • If the integration component represents a normal business component or MVG business component, Row Id must not be defined, because records for these components are being inserted.
    • If the integration component represents an association business component or an MVG association business component, leaf nodes may or may not have Row Ids defined. If Row Ids are specified, then the EAI UI Data Adapter creates an association record only. If Row Ids are not specified, then both a child record and an association record are created.

InsertLeaves returns an integration object hierarchy. Each integration component instance in the hierarchy has two fields: Row Id and Mod Id (implicit status keys used by the EAI UI Data Adapter). You can use these fields to retrieve the Row Id of the newly created record.

InsertLeaves Method Arguments

Table 34 lists the method arguments used with the InsertLeaves method. For descriptions of the methods, see EAI UI Data Adapter Business Service Method Arguments.

Table 34. Method Arguments for InsertLeaves
Method Argument Name
Type

BusObjCacheSize

Input

LOVLanguageMode

Input

SiebelMessage

Input / Output

Example of Inserting a Root Component

This example code snippet demonstrates inserting a non-existing account.

Request

The following is an example of a request:

<SiebelMessage MessageType="Integration Object" IntObjectName="Account" IntObjectFormat="Siebel Hierarchical">
   <ListOfAccount>
      <Account>
         <Type>Competitor</Type>
         <Name>Dixon Inc.</Name>
      </Account>
   </ListOfAccount>
</SiebelMessage>

Response

The following is an example of a response:

<SiebelMessage MessageId="P-3ITI" MessageType="Integration Object" IntObjectName="Account" IntObjectFormat="Siebel Hierarchical">
   <ListOfAccount>
      <Account>
         <Id>P-5NA84</Id>
         <Mod_Id>0</Mod_Id>
      </Account>
   </ListOfAccount>
</SiebelMessage>

Example of Inserting a Child Component

The code snippets in this example demonstrate inserting a non-existing business address for an existing account.

Request

The following is an example of a request:

<SiebelMessage MessageType="Integration Object" IntObjectName="Account" IntObjectFormat="Siebel Hierarchical">
   <ListOfAccount>
      <Account>
         <Id>P-5NA84</Id>
         <ListOfBusiness_Address>
            <Business_Address>
               <City>San Carlos</City>
               <Street_Address>1145 laurel street</Street_Address>
               <State>CA</State>
               <Country>USA</Country>
               <Postal_Code>94063</Postal_Code>
            </Business_Address>
         </ListOfBusiness_Address>
      </Account>
   </ListOfAccount>
</SiebelMessage>

Response

The following is an example of a response:

<SiebelMessage MessageId="P-3ITJ" MessageType="Integration Object" IntObjectName="Account" IntObjectFormat="Siebel Hierarchical">
   <ListOfAccount>
      <Account>
         <Id>P-5NA84</Id>
         <Mod_Id>1</Mod_Id>
         <ListOfBusiness_Address>
            <Business_Address>
               <Id>P-5NA8B</Id>
               <Mod_Id>0</Mod_Id>
            </Business_Address>
         </ListOfBusiness_Address>
      </Account>
   </ListOfAccount>
</SiebelMessage>

Example of Inserting an Association Child Component

This example demonstrate inserting an existing organization for an existing account. This operation associates the organization with the account. If the organization does not exist, the EAI UI Data Adapter generates an error.

Request

The following is an example of a request:

<SiebelMessage MessageType="Integration Object" IntObjectName="Account" IntObjectFormat="Siebel Hierarchical">
   <ListOfAccount>
      <Account>
         <Id>P-5NA84</Id>
            <ListOfAccount_Organization>
            <Account_Organization>
               <Id>1-123</Id>
            </Account_Organization>
         </ListOfAccount_Organization>
      </Account>
   </ListOfAccount>
</SiebelMessage>

Response

The following is an example of a response:

<SiebelMessage MessageId="P-3ITL" MessageType="Integration Object" IntObjectName="Account" IntObjectFormat="Siebel Hierarchical">
   <ListOfAccount>
      <Account>
         <Id>P-5NA84</Id>
         <Mod_Id>1</Mod_Id>
         <ListOfAccount_Organization>
            <Account_Organization IsPrimaryMVG="Y">
               <Id>0-R9NH</Id>
               <ModId>9</ModId>
            </Account_Organization>
            <Account_Organization IsPrimaryMVG="N">
               <Id>1-123</Id>
               <ModId>0</ModId>
            </Account_Organization>
         </ListOfAccount_Organization>
      </Account>
   </ListOfAccount>
</SiebelMessage>

Integration Platform Technologies: Siebel Enterprise Application Integration Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices.