Business Processes and Rules: Siebel Enterprise Application Integration > Creating and Using Dispatch Rules >

Examples of Search Expression Grammar


In the following example, assume that the XML document is a typical document your system receives and that you want to set some rules for the EAI Dispatch Service to use to parse this document.

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

- <cXML payloadID="3223232@ariba.acme.com" timestamp="1999-03-12T18:39:09-08:00" xml:lang="en-US">

- <Header>
   - <From>
      - <Credential domain="AribaNetworkUserId">
         <Identity>admin@acme.com</Identity>
      </Credential>
      - <Credential domain="AribaNetworkUserId" type="marketplace">
         <Identity>bigadmin@marketplace.org</Identity>
      </Credential>
      - <Credential domain="BT">
         <Identity>2323</Identity>
      </Credential>
   </From>
   - <To>
      - <Credential domain="DUNS">
         <Identity>942888711</Identity>
      </Credential>
   </To>
   - <Sender>
      - <Credential domain="AribaNetworkUserId">
         <Identity>admin@acme.com</Identity>
         <SharedSecret>abracadabra</SharedSecret>
      </Credential>
      <UserAgent>Ariba.com Network V1.0</UserAgent>
   </Sender>
</Header>
   - <Request deploymentMode="test">
      -<OrderRequest>
         - <OrderRequestHeader orderID="DO1234" orderDate="1999-03-12" type="new">
      - <Total>
         <Money currency="USD">12.34</Money>
      </Total>
   - <ShipTo>
.......
.......

Table 5 provides some valid search expression examples.

Table 5. Dispatch Rule Grammar
Search Expression
Description

/*/Header

Go to the second level and look at the type value of each property set and check whether it is of value Header.

/*/*@DeploymentMode

Go to the second level and look at the properties of each property set and check whether any of them has the name (not the value) of DeploymentMode.

/*/*/Request@DeploymentMode

Go to the third level and look at each property set for type of value Request and property of name DeploymentMode.

/cXML/*/OrderRequest

Search at the top level for type of value cXML and then upon matching, find a grandchild (not child) of type of value OrderRequest.

Following are examples of invalid rules:

Rule

/*/*@DeploymentMode/Request/SiebelMessage

Description

This is not a valid rule. A search for a property value must be specified at the very end. A correct form would be the following, which will have a different result.

/*/Request/*@DeploymentMode

Rule

/*@PayLoadID@TimeStamp

Description

This also is not a valid rule. It is not possible to specify more than one property name. The correct form would use two different rules to represent this:

/*@PayLoadID

and

/*@TimeStamp

Business Processes and Rules: Siebel Enterprise Application Integration Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.