MicroStrategy ONE

Tasks and Service-Oriented Architecture

In service-oriented architecture, discrete chunks of functionality are built as services that can be accessed by many applications in many different ways. In MicroStrategy Web, these services are called tasks. Once an operation has been defined as a task in MicroStrategy Web, it can be called as a service from anywhere using any protocol. What this means is that you need to build a task only once, and it can then be used everywhere. Regardless of whether a task is called from HTTP, URL, Web Services, COM, .NET, or Java, the underlying implementation is the same.

There are many scenarios in which you services are useful, in the form of MicroStrategy tasks, to insert BI data into an application. One very compelling use case is the ability to make relevant BI data visible to all users at all times. For example, you can add KPIs or team performance indicators in the corner of an e-mail application. Other use cases include support for single sign-on, the ability to control the logic in a business process based on BI data, and the ability to create reusable functionality. So, for example, you can use a task to create a MicroStrategy session that allows seamless integration between enterprise applications and MicroStrategy. Or, you can create a task that returns product inventory on hand and then use the BI data generated by the task in your business logic to determine whether to perform an action such as automatic reordering.

The diagram below illustrates how the Task Infrastructure allows MicroStrategy functionality to be accessed from any client or protocol, leveraging the MicroStrategy Web service-oriented architecture (SOA).

MicroStrategy provides a set of pre-built tasks that perform many common MicroStrategy functions. Some examples of tasks that are available for use out-of-the-box are listed below.

  • login / getSessionState

    These tasks can be used to create and retrieve a new Intelligence Server session based on parameters that are passed to it. These tasks can be used in conjunction with other tasks that require a session state, or they can be used to provide a single sign-on experience from a different application to MicroStrategy Web. 

  • reportExecute

    This task provides the discrete functionality of returning report results that have been rendered in a certain style. This is a useful task for any application that needs to consume MicroStrategy report XML or HTML. This task can be used with a custom style to retrieve output in a custom format. 

  • browseElements

    This task provides the discrete functionality of returning the elements under an attribute in a hierarchy. It supports searching and incremental fetch. 

  • searchMetadata

    This task browses elements under the folder specified by "rootFolderID" or "rootFolderName". You can use searching features such as name strings, wild cards, and dates to refine the search results.

For a full list of the out-of-the-box public tasks, refer to the Home page of the Task Administrator application.

MicroStrategy tasks are exposed through Web Services containers to make operations available in a WSDL (Web Services Description Language) and accessible by SOAP.  For more information about MicroStrategy Web Services and how to use the out-of-the box tasks through SOAP, refer to the Web Services SDK section of the MSDL.

In addition to furnishing pre-built tasks, MicroStrategy also provides the ability for users to create custom tasks and register them using the Web Customization Editor. Once a task has been registered, it can be accessed from any client or protocol and is included in the list of available tasks on the Home page of the Task Administrator applications. If you want to expose a custom task as a Web Service, you can use the Web Services Deployment Wizard, which is provided as part of the Web Customization Editor.

There are a number of major benefits of using services, in the form of MicroStrategy tasks, rather than having Web API logic in an application. For example, services are:

  • Reusable

    If logic is embedded in an application it cannot be reused by another application. Services, on the other hand, are reusable across applications.

  • Abstracted

    When you use services to create an application, you don't need to worry about the logic or workflow of MicroStrategy. You simply need to understand the parameters required for the tasks you are using, and MicroStrategy takes care of the rest.  

  • Encapsulated

    Many different services can be accessed under the same architecture. 

  • Discovery-based

    Services can be described so that they can be discovered by external mechanisms.

Several important product features in MicroStrategy Web—such as Flash dashboards, the Flex Builder-based Visualization SDK, and MicroStrategy Mobile—were built using the Task Infrastructure.

The topics in this section of the MSDL are divided into the following sections:

  • Task-related Security Roles

    This topic describes the task-related security roles that determine which application interface is used for discovering tasks and creating test URLs, as well as which servlet/page is used to execute tasks. There are three servlets/pages that can be used to open an application interface or invoke a task. taskProc can be used only to execute non-administrative tasks and cannot be used to open an application interface. taskViewer can be used only to open the Task Viewer application interface and cannot be used to execute a task. taskAdmin can be used both to open the Task Administrator application interface and to execute all tasks.

    This topic also describes a configuration change that needs to be made when you use a task-related application in a J2EE environment. 

  • Quick Start Guide to Creating and Using Tasks

    The topics in this section provide a quick way for users to start using tasks in MicroStrategy Web. The Quick Start Guide to Creating a New Task walks you through the process of creating a simple bean-based task using the Web Customization Editor. The Quick Start Guide to Using an Existing Task steps you though how to use the Task Viewer application to construct and test a URL that invokes an existing task. 

  • Creating Tasks

    The topics in this section provide detailed instructions for the two ways to create a custom task—building a new bean-based task and building a new Java-based task

  • Using Tasks

    The topics in this section describe how to use the Task Administrator applications to find out which tasks are available, to view and select the parameters that can be used with each task, and to construct and test a URL to invoke a task. 

  • Trouble-shooting Tasks

    This topic describes the three classes of status codes that are generated when a task is invoked through the Task Infrastructure.