Bookshelf Home | Contents | Index | PDF |
Integration Platform Technologies: Siebel Enterprise Application Integration > EAI Siebel Adapter Business Service > EAI Siebel Adapter Business Service Methods > Synchronize MethodYou 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:
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 ChildrenThis 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"> <AccountStatus>Active</AccountStatus> <CurrencyCode>USD</CurrencyCode> <LanguageCode>ENU</LanguageCode> <ListOfAccount_BusinessAddress> <Account_BusinessAddress IsPrimaryMVG = "Y"> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>123 Main St</StreetAddress> <Account_BusinessAddress IsPrimaryMVG = "N"> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>456 Oak St</StreetAddress> </ListOfAccount_BusinessAddress> <ActiveStatus>Y</ActiveStatus> <Organization>Default Organization</Organization> <Contact_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <ListOfContact_AlternatePhone/> <ActiveStatus>Y</ActiveStatus> <Organization>Default Organization</Organization> <Contact_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <ListOfContact_AlternatePhone/> <Account_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <OrganizationId>0-R9NH</OrganizationId> 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"> <AccountStatus>Active</AccountStatus> <CurrencyCode>USD</CurrencyCode> <LanguageCode>CHS</LanguageCode> <ActiveStatus>N</ActiveStatus> <Organization>Default Organization</Organization> <Organization>Default Organization</Organization> 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"> <AccountStatus>Active</AccountStatus> <CurrencyCode>USD</CurrencyCode> <LanguageCode>CHS</LanguageCode> <ListOfAccount_BusinessAddress> <Account_BusinessAddress IsPrimaryMVG = "Y"> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>123 Main St</StreetAddress> <Account_BusinessAddress IsPrimaryMVG = "N"> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>456 Oak St</StreetAddress> </ListOfAccount_BusinessAddress> <ActiveStatus>N</ActiveStatus> <Organization>Default Organization</Organization> <Contact_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <ListOfContact_AlternatePhone/> <ActiveStatus>N</ActiveStatus> <Organization>Default Organization</Organization> <Contact_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <ListOfContact_AlternatePhone/> Table 14 is a high level representation of the previous example. 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"> <AccountStatus>Active</AccountStatus> <CurrencyCode>USD</CurrencyCode> <LanguageCode>ENU</LanguageCode> <ListOfAccount_BusinessAddress> <Account_BusinessAddress IsPrimaryMVG = "Y"> <AddressId>1-3JGOA</AddressId> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>123 Main St</StreetAddress> <Account_BusinessAddress IsPrimaryMVG = "N"> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <AddressId>1-3JGOB</AddressId> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>456 Oak St</StreetAddress> </ListOfAccount_BusinessAddress> <ActiveStatus>Y</ActiveStatus> <Organization>Default Organization</Organization> <Contact_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <ListOfContact_AlternatePhone/> <ActiveStatus>Y</ActiveStatus> <Organization>Default Organization</Organization> <Contact_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <ListOfContact_AlternatePhone/> <Account_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <OrganizationId>0-R9NH</OrganizationId> 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"> <AccountStatus>Active</AccountStatus> <CurrencyCode>USD</CurrencyCode> <LanguageCode>CHS</LanguageCode> 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"> <AccountStatus>Active</AccountStatus> <CurrencyCode>USD</CurrencyCode> <LanguageCode>ENU</LanguageCode> <ListOfAccount_BusinessAddress> <Account_BusinessAddress IsPrimaryMVG = "Y"> <AddressId>1-3JGOA</AddressId> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>123 Main St</StreetAddress> <Account_BusinessAddress IsPrimaryMVG = "N"> <AddressActiveStatus>Y</AddressActiveStatus> <BillAddressFlag>Y</BillAddressFlag> <AddressId>1-3JGOB</AddressId> <MainAddressFlag>Y</MainAddressFlag> <ShipAddressFlag>Y</ShipAddressFlag> <StreetAddress>456 Oak St</StreetAddress> </ListOfAccount_BusinessAddress> <Account_Organization IsPrimaryMVG = "Y"> <Organization>Default Organization</Organization> <OrganizationId>0-R9NH</OrganizationId> 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. |
Integration Platform Technologies: Siebel Enterprise Application Integration | Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |