MicroStrategy ONE
Building and Testing Task URLs
The Task Administrator application provides a convenient way for users with the role of Web Server Administrator to review the list of all public tasks that are currently registered—both administrative and non-administrative—and build task URLs to test them.
First, review the list of tasks on the Home page to find the one that does what you want. If you cannot find an existing task that satisfies your requirements, you can build one and register it in the Task Registry. Once it is registered, it will also appear on the Home page. Once you have selected a task, you can build a URL on the Builderpage to execute the task and then invoke it to see if it produces the desired results. The process for building and testing a URL that invokes a task is as follows:
-
First, you need to find out the parameters that must or can be used with the task you want to use. You do this by clicking the Parameters tab of the Task Viewer application and selecting the appropriate task in the Task ID combo box. All of the parameters available for that task are listed below the task, with the following information for each parameter—the name of the parameter, whether or not it is required, a description of the parameter, and the default value if one exists. For example, suppose you choose the reportExecute task. Two of the parameters available for that task are listed below:
Name: StyleName
Required?: Yes
Description: The style to use to transform the ReportBean
Default Value:Name: reportID
Required?: No
Description: The object ID of the report to execute
Default Value:Decide which parameters you will use and the values, if any, that you will assign to each of them.
-
Next, you click the Builder tab and select the task that you identified in the previous step. A generic, incomplete URL is displayed in the URL section at the bottom of the page, and the parameters for that task are listed below, though in a slightly different way than on the Parameters page. The parameter name, whether it is required, and the default value are still shown, but not the description. In addition, there is a check box for specifying whether to include a parameter and a text box for entering a value for the parameter. To the right of the Task ID combo box where you selected the task, there is a Task Envelope combo box where you specify how the contents generated by the task should be packaged up and returned to the caller. To the right of the Task Envelope combo box, there is a Task Content Type combo box where you specify the type of format for the output of the task, such as XML or JSON. Once you have made all of your selections, click the Update URL button on the left side of the page just below the list of parameters. A complete URL with the task and task parameters that you specified is displayed in the pane below.
The value you select for theTask Envelopeis used as the value of thetaskEnvparameter in the task call. Every task call should include this parameter to explicitly specify how the contents generated by the task should be packaged.
-
Still on the Builder page, click the Invoke URL button (below the Generated URLpane) to test the URL that you have built. The application attempts to execute the task and displays the results.
You can continue to edit the choice and values of the parameters until you are satisfied with the result. However, each time that you select or deselect a parameter or change a parameter value, you must click the Update URL button to update the task URL displayed in the pane. You can then test the new URL by clicking the Invoke URL button. You can also copy and paste this URL into a web browser to see it run.
If you change a parameter selection or a value and simply click the Invoke URL button without first clicking the Update URL button, the application will not use the new values you have entered or the choices you have made, but instead will use the previous ones. The Invoke URL button simply submits the generated URL currently displayed in the pane.