XML Reference: Siebel Enterprise Application Integration > Using XML Files >

Using an XML Document as Input


You can use XML documents as input in a workflow, by calling business services to convert them to Siebel Property Sets and calling business services to process the data from XML documents as required. Figure 7 illustrates a sample workflow that uses the Siebel Adapter Insert or Update method.

Figure 7. Workflow Using Siebel Adapter with Upsert Method

The following is an example of a sample XML document containing employee information that will get upserted by the EAI Siebel Adapter in the previous workflow. Just before the EAI Siebel Adapter step in the workflow is invoked, the variable Employee Message will contain the XML document in a hierarchical format.

<SiebelMessage MessageId="" IntObjectName="Sample Employee">

  <ListOfSampleEmployees>

    <Employee>

      <FirstName>Pace</FirstName>

      <MiddleName></MiddleName>

      <LastName>Davis</LastName>

      <LoginName>ADIOTATI</LoginName>

      <PersonalTitle>Mr.</PersonalTitle>

      <EMailAddr>pdavis@pcssiebel.com</EMailAddr>

      <JobTitle>Field Sales Representative</JobTitle>

      <Phone>4153296500</Phone>

      <Private>N</Private>

        <ListOfPosition>

          <Position>

            <Name3>Field Sales Representative - S America</Name3>

            <Division>North American Organization</Division>

            <Organization>North American Organization</Organization>

            <ParentPositionName>VP Sales</ParentPositionName>

            <PositionType>Sales Representative</PositionType>

              <ListOfPosition_BusinessAddress>

                <Position_BusinessAddress>

                <City>San Mateo</City>

                <Country>USA</Country>

                <FaxNumber></FaxNumber>

                <PhoneNumber></PhoneNumber>

                <PostalCode>94175</PostalCode>

                <State>CA</State>

                <StreetAddress>1855 South Grant St</StreetAddress>

              </Position_BusinessAddress>

            </ListOfPosition_BusinessAddress>

          </Position>

      </ListOfPosition>

    </Employee>

  </ListOfSampleEmployees>

</SiebelMessage>

This EAI XML document shows an integration object called Sample Employee as specified by the IntObjectName attribute of the Siebel Message element.

The Sample Employee object has three integration components you can view using Siebel Tools:

  • Employee—A root component
  • Position—A Child of Employee
  • Position Business Address—A Child of Position

An upsert to this integration object is determined by the user key on the root component. In the Sample Employee Integration object provided as part of the sample database, the user key for the Employee integration object is Login name. Therefore, if the login name is unique, a new employee is inserted. If the system finds the login name already in the Siebel Business Applications, then it would perform an update. The above XML document will create a new employee whose name is Pace Davis and assign the position Field Sales Representative - S America to this person. You could also specify a new position and have the employee be assigned to the new position. This can be extended to other methods such as Delete or Query. If you want to delete an employee, the user key is the only element that needs to be specified.

Example. In the following example, the employee with login name ADD1 will be deleted.

<SiebelMessage MessageId="" IntObjectName="Sample Employee">

<ListOfSampleEmployees>

<Employee>

<LoginName>ADD1</LoginName>

</Employee>

</ListOfSampleEmployees>

</SiebelMessage>

Example. Query on all employees with the first name Pace and Last name starting with D.

<SiebelMessage MessageId="" IntObjectName="Sample Employee">

<ListOfSampleEmployees>

<Employee>

<FirstName>Pace</FirstName>

<LastName>D*</LastName>

</Employee>

</ListOfSampleEmployees>

</SiebelMessage>

CAUTION:  When defining these business components, be aware that the precise definition can negatively affect mobile clients and regional clients. There are setup options to allow all attachments to automatically download to mobile clients that have visibility to the underlying row. This could be quite problematic, especially for large files.

The preferred setup is demand mode, whereby mobile client users trying to open an attachment will see a message asking if they want to download the file the next time they synchronize. This is known as the deferred approach and gives users control over what files they do or do not download.

XML Reference: Siebel Enterprise Application Integration Copyright © 2006, Oracle. All rights reserved.