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

Synchronize Method


You can use the Synchronize method to make the values in a business object instance match those of an integration object instance. This operation can result in updates, insertions, or deletions in the business components. The following rules apply to the results of this method:

  • If a child component is not present in the integration object instance, the corresponding child business component rows are left untouched.
  • If the integration object instance's child component has an empty container, then all child records in the corresponding business component are deleted.
  • For a particular child component, records that exist in both the integration object instance and business component are updated. Records that exist in the integration object hierarchy and not in the business component are inserted. Records in the business component and not in the integration object instance are deleted.
  • Only the fields specified in the integration component instance are updated.

NOTE:  When the EAI Siebel Adapter starts a database transaction (initiated to allow updates to the Siebel database) it must ensure the data queried is committed and consistent. The results of these queries dictate what changes are applied, so if reads that contain uncommitted data (dirty reads) were enabled, it could cause incorrect updates by the EAI Siebel Adapter. Therefore, dirty reads are disabled during database transactions started by the EAI Siebel Adapter.

Example of Synchronize Method on Deleted Unmatched Children

This first example demonstrates deleting unmatched children when using the Synchronize method. This example uses data present in the sample database.

<?xml version = "1.0" encoding = "UTF-8"?>

<?Siebel-Property-Set EscapeNames="false"?>

<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">

  <ListOfAccount>

<Account>

<AccountStatus>Active</AccountStatus>

<CSN>1-3JGO7</CSN>

<CurrencyCode>USD</CurrencyCode>

<LanguageCode>ENU</LanguageCode>

<Location>Test</Location>

<Name>ABC Corp</Name>

<ListOfAccount_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "Y">

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<City>ATown</City>

<Country>USA</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>123 Main St</StreetAddress>

</Account_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "N">

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<City>BTown</City>

<Country>USA</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>456 Oak St</StreetAddress>

</Account_BusinessAddress>

</ListOfAccount_BusinessAddress>

<ListOfContact>

<Contact>

<ActiveStatus>Y</ActiveStatus>

<FirstName>User1</FirstName>

<LastName>User1</LastName>

<Organization>Default Organization</Organization>

<ListOfContact_Organization>

<Contact_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationIntegrationId/>

</Contact_Organization>

</ListOfContact_Organization>

<ListOfContact_AlternatePhone/>

</Contact>

<Contact>

<ActiveStatus>Y</ActiveStatus>

<FirstName>User2</FirstName>

<LastName>User2</LastName>

<Organization>Default Organization</Organization>

<ListOfContact_Organization>

<Contact_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationIntegrationId/>

</Contact_Organization>

</ListOfContact_Organization>

<ListOfContact_AlternatePhone/>

</Contact>

</ListOfContact>

<ListOfAccount_Organization>

<Account_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationId>0-R9NH</OrganizationId>

<OrganizationIntegrationId/>

</Account_Organization>

</ListOfAccount_Organization>

</Account>

  </ListOfAccount>

</SiebelMessage>

Then the following XML (integration object instance) is submitted with Synchronize:

<?xml version = "1.0" encoding = "UTF-8"?>

<?Siebel-Property-Set EscapeNames="false"?>

<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">

  <ListOfAccount>

<Account>

<AccountStatus>Active</AccountStatus>

<CSN>1-3JGO7</CSN>

<Competitor>Y</Competitor>

<CurrencyCode>USD</CurrencyCode>

<LanguageCode>CHS</LanguageCode>

<Location>test</Location>

<Name>ABC Corp</Name>

<ListOfContact>

<Contact>

<ActiveStatus>N</ActiveStatus>

<FirstName>User1</FirstName>

<LastName>User1</LastName>

<MiddleName></MiddleName>

<Organization>Default Organization</Organization>

</Contact>

<Contact>

<FirstName>User3</FirstName>

<LastName>User3</LastName>

<MiddleName></MiddleName>

<Organization>Default Organization</Organization>

</Contact>

</ListOfContact>

</Account>

  </ListOfAccount>

</SiebelMessage>

Following is the result you will receive. Because the contact information is included in the integration object instance, User2 in the database is deleted because it was an unmatched node. User1 is updated because it is a matched node. User3 is inserted because it is a new node. Since Business Address was not included in the integration object instance, it is left in the business object.

<?xml version = "1.0" encoding = "UTF-8"?>

<?Siebel-Property-Set EscapeNames="false"?>

<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">

  <ListOfAccount>

<Account>

<AccountStatus>Active</AccountStatus>

<CSN>1-3JGO7</CSN>

<CurrencyCode>USD</CurrencyCode>

<LanguageCode>CHS</LanguageCode>

<Location>Test</Location>

<Name>ABC Corp</Name>

<ListOfAccount_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "Y">

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<City>ATown</City>

<Country>USA</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>123 Main St</StreetAddress>

</Account_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "N">

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<City>BTown</City>

<Country>USA</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>456 Oak St</StreetAddress>

</Account_BusinessAddress>

</ListOfAccount_BusinessAddress>

<ListOfContact>

<Contact>

<ActiveStatus>N</ActiveStatus>

<FirstName>User1</FirstName>

<LastName>User1</LastName>

<Organization>Default Organization</Organization>

<ListOfContact_Organization>

<Contact_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationIntegrationId/>

</Contact_Organization>

</ListOfContact_Organization>

<ListOfContact_AlternatePhone/>

</Contact>

<Contact>

<ActiveStatus>N</ActiveStatus>

<FirstName>User3</FirstName>

<LastName>User3</LastName>

<Organization>Default Organization</Organization>

<ListOfContact_Organization>

<Contact_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationIntegrationId/>

</Contact_Organization>

</ListOfContact_Organization>

<ListOfContact_AlternatePhone/>

</Contact>

</ListOfContact>

</Account>

  </ListOfAccount>

</SiebelMessage>

Table 14 is a high level representation of the previous example.

Table 14. Representation of the Synchronize Method on Deleted Unmatched Children
Record In Database
Integration Object Instance
Record After Synchronize

Account: ABC Corp

  • Business Address: 123 Main St
  • Business Address: 456 Oak St
  • Contact: User1
    • Organization: Default Org.
  • Contact: User2
    • Organization: Default Org.
  • Organization: Default Org.

Account: ABC Corp

  • Contact: User1
  • Contact: User3

Account: ABC Corp

  • Business Address: 123 Main St
  • Business Address: 456 Oak St
  • Contact: User1
    • Organization: Default Org
  • Contact: User3
    • Organization: Default Org.
  • Organization: Default Org.

This second example demonstrates how all records with an empty container are deleted when using the Synchronize method.

If you start with this business component data:

<?xml version = "1.0" encoding = "UTF-8"?>

<?Siebel-Property-Set EscapeNames="false"?>

<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">

  <ListOfAccount>

<Account>

<AccountStatus>Active</AccountStatus>

<CSN>1-3JGO7</CSN>

<CurrencyCode>USD</CurrencyCode>

<LanguageCode>ENU</LanguageCode>

<Location>test</Location>

<Name>ABC Corp</Name>

<ListOfAccount_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "Y">

<AddressId>1-3JGOA</AddressId>

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<City>MyTown</City>

<Country>Canada</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>123 Main St</StreetAddress>

</Account_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "N">

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<AddressId>1-3JGOB</AddressId>

<City>YourTown</City>

<Country>Canada</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>456 Oak St</StreetAddress>

</Account_BusinessAddress>

</ListOfAccount_BusinessAddress>

<ListOfContact>

<Contact>

<ActiveStatus>Y</ActiveStatus>

<FirstName>User1</FirstName>

<LastName>User1</LastName>

<MiddleName/>

<Organization>Default Organization</Organization>

<ListOfContact_Organization>

<Contact_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationIntegrationId/>

</Contact_Organization>

</ListOfContact_Organization>

<ListOfContact_AlternatePhone/>

</Contact>

<Contact>

<ActiveStatus>Y</ActiveStatus>

<FirstName>User2</FirstName>

<LastName>User2</LastName>

<MiddleName/>

<Organization>Default Organization</Organization>

<ListOfContact_Organization>

<Contact_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationIntegrationId/>

</Contact_Organization>

</ListOfContact_Organization>

<ListOfContact_AlternatePhone/>

</Contact>

</ListOfContact>

<ListOfAccount_Organization>

<Account_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationId>0-R9NH</OrganizationId>

<OrganizationIntegrationId/>

</Account_Organization>

</ListOfAccount_Organization>

</Account>

  </ListOfAccount>

</SiebelMessage>

And the following integration object instance is passed in:

<?xml version = "1.0" encoding = "UTF-8"?>

<?Siebel-Property-Set EscapeNames="false"?>

<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">

  <ListOfAccount>

<Account>

<AccountStatus>Active</AccountStatus>

<CSN>1-3JGO7</CSN>

<Competitor>Y</Competitor>

<CurrencyCode>USD</CurrencyCode>

<LanguageCode>CHS</LanguageCode>

<Location>test</Location>

<Name>ABC Corp</Name>

<ListOfContact/>

</Account>

  </ListOfAccount>

</SiebelMessage>

After the sync operation, all the children contacts are deleted because none of the nodes match.

<?xml version = "1.0" encoding = "UTF-8"?>

<?Siebel-Property-Set EscapeNames="false"?>

<SiebelMessage MessageId = "1-2QY5" IntObjectName = "EAI Account" MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">

  <ListOfAccount>

<Account>

<AccountStatus>Active</AccountStatus>

<CSN>1-3JGO7</CSN>

<CurrencyCode>USD</CurrencyCode>

<LanguageCode>ENU</LanguageCode>

<Location>test</Location>

<Name>ABC Corp</Name>

<ListOfAccount_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "Y">

<AddressId>1-3JGOA</AddressId>

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<City>MyTown</City>

<Country>Canada</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>123 Main St</StreetAddress>

</Account_BusinessAddress>

<Account_BusinessAddress IsPrimaryMVG = "N">

<AddressActiveStatus>Y</AddressActiveStatus>

<BillAddressFlag>Y</BillAddressFlag>

<AddressId>1-3JGOB</AddressId>

<City>YourTown</City>

<Country>Canada</Country>

<MainAddressFlag>Y</MainAddressFlag>

<ShipAddressFlag>Y</ShipAddressFlag>

<StreetAddress>456 Oak St</StreetAddress>

</Account_BusinessAddress>

</ListOfAccount_BusinessAddress>

<ListOfAccount_Organization>

<Account_Organization IsPrimaryMVG = "Y">

<Organization>Default Organization</Organization>

<OrganizationId>0-R9NH</OrganizationId>

<OrganizationIntegrationId/>

</Account_Organization>

</ListOfAccount_Organization>

</Account>

  </ListOfAccount>

</SiebelMessage>

Table 15 is a high level representation of the operation.

This second example demonstrates how all records with an empty container are deleted when using the Synchronize method.

Table 15. Representation of Records with Empty Containers Being Deleted Using Synchronize Method
Record In Database
Integration Object Instance
Record After Synchronize

Account: ABC Corp

  • Business Address: 123 Main St
  • Business Address: 456 Oak St
  • Contact: User1
    • Organization: Default Org.
  • Contact: User2
    • Organization: Default Org.
  • Organization: Default Org.

Account: ABC Corp

  • Contact:

Account: ABC Corp

  • Business Address: 123 Main St
  • Business Address: 456 Oak St
  • Organization: Default Org.
Integration Platform Technologies: Siebel Enterprise Application Integration Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices.