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

Insert Method


This method is also similar to the Synchronize method with the exception that the EAI Siebel Adapter generates an error if a matching root component is found; otherwise, it inserts the root component and synchronizes all the children. It is important to note that when you insert a record, there is a possibility that the business component would create default children for the record, which will be removed by the Insert method. The Insert method synchronizes the children, which deletes all the default children. For example, if you insert an account associated with a specific organization, it will also be automatically associated with a default organization. As part of the Insert method, the EAI Siebel Adapter deletes the default association, and associates the new account with only the organization that was originally defined in the input integration object instance. The EAI Siebel Adapter achieves this by synchronizing the children.

Example of Using the Insert Method

If you use the Insert method with the example of the integration object instance represented in XML that follows, a new service request is created with two activities.

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

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

<SiebelMessage MessageId = "1-2R6E" IntObjectName = "Sample Service Request" MessageType = "Integration Object" IntObjectFormat = "Siebel Hierarchical">

  <ListOfSampleServiceRequest>

<ServiceRequest>

<Account>Genesys Communications</Account>

<AccountLocation>San Francisco, CA</AccountLocation>

<Area>Network</Area>

<ClosedDate/>

<CommitTime/>

<ContactBusinessPhone>4155551100</ContactBusinessPhone>

<ContactLastName>Kastrup-Larsen</ContactLastName>

<Description>Setting up Router services<Description>

<Priority>3-Medium</Priority>

<SRNumber>1-MYUNIQUEVALUE</SRNumber>

<ServiceRequestType>External</ServiceRequestType>

<ListOfAction>

  <Action>

    <BillableFlag>N</BillableFlag>

    <Description2>test activity1</Description2>

    <EstWorkTimeRemaining>8</EstWorkTimeRemaining>

    <Planned/>

    <PrimaryOwnedBy>SADMIN</PrimaryOwnedBy>

    <RowStatusOld>N</RowStatusOld>

    <Status>Unscheduled</Status>

    <Type>Appointment</Type>

  </Action>

  <Action>

    <BillableFlag>N</BillableFlag>

    <Description2>test activity2</Description2>

    <EstWorkTimeRemaining>8</EstWorkTimeRemaining>

    <Planned/>

    <PrimaryOwnedBy>SADMIN</PrimaryOwnedBy>

    <Status>Unscheduled</Status>

    <Type>Appointment</Type>

  </Action>

</ListOfAction>

</ServiceRequest>

  </ListOfSampleServiceRequest>

</SiebelMessage>

For this example to work, you must have the contact, Kastrup-Larsen, in the database. If you try the Insert method against a server database where the contact does not exist, you will receive the following error:

Picklist validation of field 'Contact Last Name' in integration component 'Service Request' did not find any matches satisfying the query '[Last Name] = "Kastrup-Larsen"', and an attempt to create a new record through the picklist failed (SBL-EAI-04186)

Also, if you try to insert the previous instance a second time, you will receive the following error message:

IDS_ERR_EAI_SA_INSERT_MATCH_FOUND. Insert operation on integration component 'Service Request' failed because a matching record in business component 'Service Request' with search specification '[SR Number] = "1-MYUNIQUEVALUE" was found.(SBL-EAI-04383).

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