MicroStrategy ONE
Specific Workflow for a Common MicroStrategy Task (Service)
There are many situations in which you might want to use a service to embed BI data into an application. For example, you might use data as a service to support single sign-on, control the logic in a business process based on BI data, or make relevant BI data visible to users at all times. The illustration below shows a composite application with embedded BI data from a number of different sources, together with tabbed links to news and articles. The grid with thresholds, outlined in a heavy red line, illustrates embedded MicroStrategy BI data, while the two pie charts and the map represent BI data from other sources.
Applications with embedded BI data can be more or less dynamic and interactive. In highly interactive applications, when users continue to make requests for BI data during a discrete time period, it makes sense to maintain and use the same session state. When you use data as a service to embed the MicroStrategy BI data in such an interactive application, you use one task to open the session initially, separate tasks to make requests for data, and another task to close the session when the user is finished making requests. In less interactive applications, when there are long periods between requests, it makes more sense to open a session only when there is request for data, obtain the data, and then immediately close the session. MicroStrategy provides a special composite task, called reportDataService, that includes the full workflow of connecting, authenticating, retrieving data, and closing the connection. This topic describes the reportDataService task.
The reportDataService task is made up of three other tasks—logon, reportExecute, and logout. It is designed especially to allow applications with embedded BI data to quickly open a session, retrieve data, and close the session. The reportDataService task allows MicroStrategy BI data to be retrieved by invoking only one task and supplying the necessary parameters. While it is possible to invoke separate tasks to perform the same actions, the reportDataService task makes it quick and easy.
The workflow—and the execution of the separate tasks that make up the reportDataService task—proceed as follows:
-
An application makes a call to MicroStrategy to retrieve data in a specific format. The application passes information such as the specific report data needed, user and connection information, and the required output format.
During this step, the following actions take place in the background:
-
A login task request (the first task in the composite reportDataService task) is passed with the user and connection information needed to login. The login task is executed and a session is created.
-
A reportExecute task request (the second task in the composite reportDataService task) is passed with the ID of the report to be executed and the session state just created. The report is executed.
-
-
The application receives the data in the format it needs.
During this step, the following action takes place in the background after the data is received:
-
A logout task request (the third task in the composite reportDataService task) is passed with the session state just created. The logout task is executed and the session is invalidated.
-
Common Parameters for the reportDataService Task
The most commonly used parameters for the reportDataService task are listed below:
-
userid
The MicroStrategy user ID to use when creating a session on Intelligence Server.
-
password
The password for the specified MicroStrategy user ID used when creating a session on Intelligence Server.
-
authMode
The type of credentials that should be used to create a session on Intelligence Server for the specified MicroStrategy user ID. See EnumDSSXMLAuthModes for possible values and details. -
server
The machine name (or IP address) of the MicroStrategy Intelligence Server to which to connect. -
port
The port property of the MicroStrategy Intelligence Server to which to connect.
-
project
The name of the MicroStrategy project to which to connect.
-
reportID
The unique identifier of the report to be executed.
-
execFlags
The flags to use when executing the report. See EnumDSSXMLExecutionFlags for possible values and details.
-
resultFlags
The result flags to use. See EnumReportViewModes for possible values and details.
In addition to creating a new session and executing a report, you can also use an existing session in the reportDataService task and retrieve the cached results of a previous report execution. Click here to see an alphabetical list of all parameters (not just the most common parameters) that can be used with the reportDataService task, including those required for passing a session state and using a report cache.
The composite reportDataService task logs on, retrieves report data, and logs off, but the same logic can be applied to other scenarios. For example, a composite task can open a connection, retrieve a different kind of BI data (such as document XML, History List XML, or folder XML), and then close the connection.
See also