Bookshelf Home | Contents | Index | PDF |
Integration Platform Technologies: Siebel Enterprise Application Integration > EAI Siebel Adapter Business Service > EAI Siebel Adapter Business Service Methods > QueryPage MethodThis method is useful when the search specification retrieves a large number of records at the root component. To avoid returning one huge Siebel Message, you can specify the number of records to be returned using the PageSize argument, as presented in Table 25. You can also use method arguments such as OutputIntObjectName, SearchSpec, SortSpec, ViewMode, and StartRowNum to dictate which records to return. Even though the QueryPage returns a limited number of records, it keeps the data in the cache, which you can then retrieve by calling the EAI Siebel Adapter with a new value for the StartRowNum method argument. Please note that this is only possible if the method arguments OutputIntObjectName, PageSize, SearchSpec, SortSpec, and ViewMode are not changed and the NewQuery method argument is set to False. NOTE: The EAI Siebel Adapter returns the output of the QueryPage() method as one Siebel Message. This integration object instance is stored in the process memory. If your query returns a large number of records, this will result in your Siebel component's memory consumption being high. The following is an example of using the QueryPage() method in a business service. var EAIService = TheApplication().GetService("EAI Siebel Adapter"); var writeSvc = TheApplication().GetService("EAI XML Write to File"); var EAIin = TheApplication().NewPropertySet(); var ResultSet= TheApplication().NewPropertySet(); // set up input arguments, get 10 at a time EAIin.SetProperty("OutputIntObjectName", "EAI Account"); EAIin.SetProperty("PageSize", "10"); EAIin.SetProperty("SearchSpec", "[Account.Name] LIKE '3*'"); EAIin.SetProperty("StartRowNum", i); EAIin.SetProperty("NewQuery", "true"); // retrieve the business component data EAIService.InvokeMethod("QueryPage", EAIin, ResultSet); while ( (ResultSet.GetChildCount() > 0) && (moreRecords)) { countOfObjects = countOfObjects + ResultSet.GetProperty("NumOutputObjects"); // write out first chunk of data retrieved ResultSet.SetProperty("FileName", "d:\\temp\\EAIaccount$$.xml"); writeSvc.InvokeMethod("WriteEAIMsg", ResultSet, Outputs); // reuse the existing input property set, except don't reissue query EAIin.SetProperty("NewQuery", "false"); i= i+10; // get next 10 records EAIin.SetProperty("StartRowNum", i); ResultSet.Reset(); // clear previous result set EAIService.InvokeMethod("QueryPage", EAIin, ResultSet); |
Integration Platform Technologies: Siebel Enterprise Application Integration | Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |