Business Processes and Rules: Siebel Enterprise Application Integration > Creating and Using Dispatch Rules > EAI Dispatch Service Scenarios >
Outbound Scenarios Using ProcessAggregateRequest
The ProcessAggregateRequest method allows you to have multiple invocation of one or more methods in one or more business services using a single request. The following examples illustrate the use of this method to query account and employee information. Querying the Account Integration Object
The following example shows how you can invoke multiple business services and setting arguments for each of the services. This is done using simple arguments for the services and by having the aggregate request invoke the QueryPage method of the EAI Siebel Adapter twice, with different searchspecs. <?xml version="1.0" encoding="UTF-8"?> <?Siebel-Property-Set EscapeNames="true"?> <PropertySet> <AggregatedServiceRequest> <BusinessServiceWrapper BusinessServiceName="EAI Siebel Adapter" BusinessServiceMethod="QueryPage"> <Argument Wrapper PageSize="4" StartRowNum="0" OutputIntObjectName="Sample Account" SearchSpec="[Account.Name] LIKE 'Aa*'"/> </BusinessServiceWrapper> <BusinessServiceWrapper BusinessServiceName="EAI Siebel Adapter" BusinessServiceMethod="QueryPage"> <ArgumentWrapper PageSize="4" StartRowNum="0" OutputIntObjectName="Sample Account" SearchSpec="[Account.Name] LIKE 'Bb*'"/> </BusinessServiceRequest> </AggregatedServiceRequest> </PropertySet>
Querying the Employee Integration Object
The following example shows how you can set complex type business service method arguments. The aggregate request invokes the EAI Siebel Adapter twice, and, instead of using searchspec, uses query by example by passing in a SiebelMessage. NOTE: All simple arguments are attributes of the ArgumentWrapper element, and the complex argument is a child element.
<?xml version="1.0" encoding="UTF-8" ?> <?Siebel-Property-Set EscapeNames="true"?> <PropertySet> <AggregatedServiceRequest> <BusinessServiceWrapper BusinessServiceName="EAI Siebel Adapter" BusinessServiceMethod="Query"> <ArgumentWrapper> <SiebelMessage MessageType="Integration Object" IntObjectName="Sample Employee" IntObjectFormat="Siebel Hierarchical"> <ListOfSampleEmployee> <Employee EMailAddr="madams@siebel.com" /> </ListOfSampleEmployee> </SiebelMessage> </ArgumentWrapper> </BusinessServiceWrapper> <BusinessServiceWrapper BusinessServiceName="EAI Siebel Adapter" BusinessServiceMethod="Query"> <ArgumentWrapper> <SiebelMessage MessageType="Integration Object" IntObjectName="Sample Employee" IntObjectFormat="Siebel Hierarchical"> <ListOfSampleEmployee> <Employee FirstName="John" LastName="Doe"/> </ListOfSampleEmployee> </SiebelMessage> </ArgumentWrapper> </BusinessServiceWrapper> </AggregatedServiceRequest> </PropertySet>
|