book
Article ID: KB0088436
calendar_today
Updated On:
Description
Resolution:
In order for hawk to display a table reply it needs 2 things:
1) An index field defined in the method attribute. The index field (or column) is a row that needs to have a unique value, but could be of any Hawk allowed type other than boolean. For more details, please see the Hawk AMI manual.
(XML notation is used below to describe the configuration. Please see the User Guides that describe how to configure a hawk microagent and method.)
<method name="getTable" type="INFO" index="indexLine" />
Where indexLine is:
<outputParameter name="indexLine" type="integer" />
2) Construct the reply message as a nested MTree for a Table display on hawk. Pseudocode follows:
// method has 3 outputParameters: indexLine, fieldName, value = the 3 columns of the table
processMethodInvocation(inTree, outTree)
{
...
for (i = 1; i < maxRow; i++) {
MTree rowTree;
rowTree.append("indexLine", i);
rowTree.append("fieldName", "placeholder");
rowTree.append("value", "0");
outTree.append(rowTree);
}
}
Issue/Introduction
How do I return a multiple row reply (i.e. table) to Hawk using SDK?