MicroStrategy ONE
Consuming Tasks
Once you have built and tested a task, it is ready to be consumed. This topic describe the workflow—and the consumer requirements at each step—when a task is consumed as a service by a web application.
-
Understanding the task request requirements
Tasks generally expect to receive information from the application that is consuming the service they represent, and they expect to pass information back to that application.
-
The consumer of the task needs to understand the parameters it must pass to the task.
-
The consumer of the task needs to understand what the task returns.
Users with the role of Web Server Administrator can use the Task Administrator application.
-
-
Gathering the information needed for the task request
The information that a task expects to receive must be gathered by or available to the application that invokes the task.
-
If a session state is needed, the consumer of the task must be able to gather the correct credentials from the user.
-
If the task requires any other parameters, the consumer of the task must be able to gather that information as well.
-
-
Constructing the task call using the required protocol
-
The consumer of the task needs to be able to construct a task call in the required protocol—either HTTP if the task will be invoked using a URL request or SOAP if the task will be invoked using a web service call.
-
The task call should always include the taskEnv parameter to explicitly specify how the contents generated by the task should be packaged.
-
If a Task Invoker or Task Developer role is making the task call, the taskProc servlet should be used to invoke the task. This servlet executes a user task identified by its task ID. If no task ID is supplied, a failure message is returned in the format of the specified envelope. If the task ID for an administrative task is supplied, an exception is thrown.
-
If a Web Server Administrator role is making the task call, any task ID can be used—for a user task or an administrative task.
-
-
Interpreting the status codes generated during task execution
-
A status code is generated when a task is executed. The consumer of the task needs to be able to understand these task status codes which indicate whether the task was successful or not.
-
-
Parsing or understanding the task response
-
The consumer of the task must be able to parse or understand the response passed back to it by the task.
-