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:

  1. 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.  

  2. 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. ClosedClick 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.

  • authMode
    The type of credentials that should be used to create a session on the Intelligence Server for the specified MicroStrategy user ID. See EnumDSSXMLAuthModes for possible values and details. You use this parameter when you are creating a new session.

  • execFlags
    The flags to use when executing the report. See EnumDSSXMLExecutionFlags for possible values and details. You use this parameter when you are executing a report.  

  • msgID
    The message ID of a previously executed report. You use this parameter if you have already executed a report and want to use the cached results.

  • password
    The password for the specified MicroStrategy user ID. You use this parameter when you are creating a new session.

  • port
    The port property of the MicroStrategy Intelligence Server to which to connect. You use this parameter when you are creating a new session.

  • project
    The name of the MicroStrategy project to which to connect. You use this parameter when you are creating a new session.

  • reportID
    The object ID of the report to execute. You use this parameter when you are executing a report.

  • reportViewMode
    The view mode of the report. See EnumReportViewModes for possible values and details. You use this parameter when you are executing a report.

  • resultFlags
    The result flags to use. See EnumReportViewModes for possible values and details. You use this parameter when you are executing a report.  

  • server
    The machine name (or IP address) of the MicroStrategy Intelligence Server to which to connect. You use this parameter when you are creating a new session.  

  • sessionFlags
    The session flags to use when logging out. You use this parameter when you are logging out.

  • sessionState
    The previously used session state to use for this task invocation. You use this parameter if you want to retrieve BI data and you have already created a session. You also use this parameter when you are logging out.

  • styleName
    The style that should be used to transform the ReportBean. You use this parameter when you are executing a report.

  • userid
    The MicroStrategy user ID to use. You use this parameter when you are creating a new session.

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