Integration Platform Technologies: Siebel eBusiness Application Integration Volume ll > EAI Siebel Adapter >

About the SearchSpec Input Method Argument


The SearchSpec input method argument is applicable to QueryPage, Query, Delete, and Execute methods. This method argument allows you to specify complex search specifications as free text in a single method argument. Expressions within a single integration component are restricted only by the Siebel Query Language supported by the Object Manager. Integration components and fields are referenced using the following notation:

[IntCompName.IntCompFieldName]

For example, given an integration object definition with two integration components, Account as the root component and Contact as the child component, the following search specification is allowed:

([Account.Site] LIKE "A*" OR [Account.Site] IS NULL) AND [Contact.PhoneNumber] IS NOT NULL

This search specification queries accounts that either have a site that starts with the character A, or do not have a site specified. In addition, for the queried accounts, it queries only those associated contacts that have a phone number.

NOTE:  The AND operator is the only allowed operator among different integration components. You use DOT notation to refer to integration components and their fields.

You can include the child integration component in a search specification only if its parent components are also included. For example, using the same integration object definition as in previous examples, the [Contact.PhoneNumber] IS NOT NULL queries every account. Then for each account, it queries only contacts that have a phone number. If you want to query only accounts that are associated with contacts that have a phone number specified, then you need to create another business object, and an integration object based on that business object, which has contact as a root component, and account as its child component.

The following procedure illustrates how to use the SearchSpec to query specific accounts.

To query accounts and addresses based on integration object's SearchSpec field

  1. From the application-level menu, choose Navigate > Site Map > Administration - Business Process > Workflow Processes.
  2. Create a new workflow process based on the Sample Account business object.

    NOTE:  Make sure all the fields you need are activated in the object.

  3. Define the process properties.

    Workflow process properties are global to the entire workflow. The Account Message is defined to identify the outbound Account as a hierarchical structure. The Error Message, Error Code, Object Id, and Siebel Operation Object Id properties are included in each workflow by default.

    Name
    Data Type
    In/Out

    Account Message

    Hierarchy

    In/Out

    Error Code

    String

    In/Out

    Error Message

    String

    In/Out

    Object Id

    String

    In/Out

    Process Instance Id

    String

    In/Out

    Siebel Operation Object Id

    String

    In/Out

  4. Click on the Process Designer tab in the bottom applet and design your workflow process as follows.
  5. Double-click on the first step, after Start, and set it up to invoke the EAI Siebel Adapter to query the accounts and addresses for all records that match the desired search specification—for example, accounts created today with State equal to "IL." To achieve this you need the following input and output arguments.
    Input Arguments
    Type
    Value

    Account Message

    Literal

    Sample Account

    Search Specification

    Expression

    '[Account.Created] =' +Today() +'[Account_BusinessAddress.State] = "IL"'

  6. Double-click on the second step and set it up to write the record set to a text file using the EAI XML Write to File business service. Use the following arguments with the Write Siebel Message method.
    Input Arguments
    Type
    Value
    Property Name
    Property Data Type

    File Name

    Literal

    c:\accnt&add.xml

    -

    -

    Siebel Message

    Process Property

    -

    Account Message

    Hierarchy

    The EAI XML Write to File business service converts the hierarchical message to XML and writes the result to the text file named in the File Name argument as follows:

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

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

    - <SiebelMessage MessageId="1IS-7LT" IntObjectFormat="Siebel Hierarchical" MessageType="Integration Object" IntObjectName="Sample Account">

    - <ListOfSampleAccount>

    - <Account>

       <Created>04/05/2002 07:41:10</Created>

       <CSN>1IS-1DBRT</CSN>

       <Location>Princeton</Location>

       <Name>1st Account created today</Name>

    - <ListOfAccount_BusinessAddress>

    - <Account_BusinessAddress IsPrimaryMVG="N">

       <City>Abbott Park</City>

       <Country>USA</Country>

       <State>IL</State>

       <StreetAddress>1 Abbott Rd. D3m, B 3</StreetAddress>

       <AddressName>1 Abbott Rd. D3m, B 3, Abbott Park, IL</AddressName>

       </Account_BusinessAddress>

       </ListOfAccount_BusinessAddress>

       </Account>

    - <Account>

       <Created>04/05/2002 07:42:27</Created>

       <CSN>1IS-1DBRY</CSN>

       <Location>Orange</Location>

       <Name>2nd Account created today</Name>

    - <ListOfAccount_BusinessAddress>

    - <Account_BusinessAddress IsPrimaryMVG="Y">

       <City>Chicago</City>

       <Country>USA</Country>

       <State>IL</State>

       <StreetAddress>1 BOP, 7th Floor</StreetAddress>

       <AddressName>1 BOP, 7th Floor, Chicago, IL</AddressName>

       </Account_BusinessAddress>

       </ListOfAccount_BusinessAddress>

       </Account>

       </ListOfSampleAccount>

       </SiebelMessage>

Integration Platform Technologies: Siebel eBusiness Application Integration Volume ll