Establishing an HTTP session with an Actuate web application
The actuate class is the general controller for the HTTP session. Call actuate.initialize( ) to establish a connection to an Actuate application. Load the elements that are selected by actuate.load( ) before accessing reports or applications. Initialization establishes a session with an Actuate service. To initialize the actuate object, call the actuate.initialize( ) initialization function. To use actuate.initialize( ), provide connection parameters as shown in the following code:
actuate.initialize("http://127.0.0.1:8700/iportal", reqOps, null, null, runReport, null);
*http://127.0.0.1:8700/iportal is a URL for the Actuate report application service. This URL must correspond to an Actuate Deployment Kit for BIRT Reports application or iHub Visualization Platform client application.
*reqOps specifies an actuate.RequestOptions object, which is required for most operations. A default request options object can be generated by calling the constructor without any input parameters, as shown in the following code:
var reqOps = new actuate.RequestOptions( );
Additional options are required to support specific classes. For example, to use dashboards and gadgets, set the volume profile to access and set the repository type to encyclopedia before calling initialize using code similar to the following.
var reqOps = new actuate.RequestOptions( );
reqOps.setVolumeProfile( "Default Volume" );
reqOps.setRepositoryType(
actuate.RequestOptions.REPOSITORY_ENCYCLOPEDIA);
*The third and fourth parameters are reserved. Leave these parameters as null.
*runReport is the callback function called after the initialization finishes. Specify the callback function on the same page as the initialize function. The callback function cannot take a passback variable.
*null specifies the optional errorCallback parameter. The errorCallback parameter specifies a function to call when an error occurs.
The initialization procedure in this section is the first step in using Actuate JavaScript API objects. Nest the initialization code in the second <script> element in the <div> element of the page.
The runReport( ) function is used as a callback function that executes immediately after actuate.initialize( ) completes. The page must contain runReport( ).