TaskDataBlox

With TaskDataBlox tags, you can provide data for ReportBlox tags to generate lists of mining tasks in tabular format. With these lists, you can manage running and completed mining tasks.

Syntax

<iminer:taskData [attribute="value"] >
   ...
</iminer:taskData>  

where:

attribute
is one of the attributes that are listed in the attribute table
value
is a valid value for the attribute

Usage

For ReportBlox tags, TaskDataBlox tags are used instead of SQLDataBlox tags as the data source. TaskDataBlox tags retrieve the mining tasks from the SQW control database depending on their visibility.

When you create, cancel, or delete a mining task, the list of mining tasks is modified. Therefore you must update the ReportBlox tags by using the refreshReport() JavaScript method. This method updates the table cells of an interactive report without reloading a page. To update the data of the TaskDataBlox tags, call the dataChanged() method of the TaskDataBlox tags.

You can change the style and the format of the report by using the Blox nested within the ReportBlox. For more information, see the Alphablox Documentation.

This is necessary because manually adding a FormatBlox overwrites the FormatBlox added by the TaskDataBlox since it is not possible to add two or more FormatBlox. The TaskDataBlox automatically sets a FormatBlox that tells the ReportBlox not to encode HTML because links and images are provided by the TaskDataBlox.

Nesting FormatBlox within ReportBlox

The ClusterVisualizerLinkBlox sets a FormatBlox that tells the ReportBlox not to encode HTML because links are provided by the ClusterVisualizerLinkBlox.

You can also manually add FormatBlox to ReportBlox. However, because you can add only one FormatBlox to ReportBlox, the FormatBlox that was previously added by ClusterVisualizerLinkBlox is overwritten. Therefore, you must tell ReportBlox not to encode HTML by adding the following <bloxreport:html> tag:

<bloxreport:format>

   <bloxreport:html member="" format=""/>

   ...

</bloxreport:format>         

Tag description

The following table shows the attribute of the <iminer:taskData> tag.

Table 1. Attribute of the <iminer:taskData> tag
Tag attribute Required Description
ID No The unique identifier for this instance of TaskDataBlox
application name No If this attribute is set, only tasks from the given application are shown.
process name No If this attribute is set, only tasks with the given process name are shown.
loginPage No If this attribute is set and you have not yet authenticated yourself by using the miningblox login tag, you are forwarded to the specified URL that contains the Login tag.

Example

The following examples shows how to use the TaskDataBlox tags:

<HEAD>
   ...
</HEAD>

<%
   Object o = bloxContext.getBlox("myTasks");
   if(o instanceof com.ibm.iminer.blox.TaskDataBlox) {
      com.ibm.iminer.blox.TaskDataBlox taskDataBlox =
         (com.ibm.iminer.blox.TaskDataBlox) o;
      taskDataBlox.dataChanged();
   }
%>

<BODY onload="refreshReport('myTaskReport')">
<bloxreport:report id="myTaskReport" interactive="true">
   <iminer:taskData id="myTasks" />
   <bloxreport:sort member="Task" ascending="true" />
   <bloxreport:style>
      <bloxreport:column member="Task"
         style="white-space:nowrap" />
      <bloxreport:column member="StartDate"
         style="text-align: right; white-space:nowrap" />
      <bloxreport:column member="StartTime"
         style="text-align: right; white-space:nowrap" />
      <bloxreport:column member="EndDate"
         style="text-align: right; white-space:nowrap" />
      <bloxreport:column member="EndTime"
         style="text-align: right; white-space:nowrap" />
      <bloxreport:column member="Status" style="text-align:
center" />
      <bloxreport:column member="Action"
style="white-space:nowrap" />
      <bloxreport:columnHeader columnName="StartTime"
         style="white-space:nowrap" />
      <bloxreport:columnHeader columnName="EndTime"
         style="white-space:nowrap" />
   </bloxreport:style>
   <bloxreport:text>
      <bloxreport:columnHeader text="Start Date"
columnName="StartDate" />
      <bloxreport:columnHeader text="Start Time"
columnName="StartTime" />
      <bloxreport:columnHeader text="End Date"
columnName="EndDate" />
      <bloxreport:columnHeader text="End Time"
columnName="EndTime" />
      <bloxreport:columnHeader text="" columnName="Action" />
   </bloxreport:text>
</bloxreport:report>
</BODY>             

The following graphic shows the result of the above coding example:

Figure 1. The result of the TaskDataBlox tagThe graphic above shows the result of the coding example in this section.


Feedback | Information roadmap