Displaying Results
Most ActionSteps store their results in output parameters, which can be evaluated later in the script and used as input parameters for subsequent actions. In this aspect, ActionSteps are akin to methods or functions in traditional programming languages like Java or C++. However, a key difference is the ability to display results in complex formats and structures. Actions can present their results in lists, tables, or even more complex data structures, significantly enhancing flexibility.
Input parameters and output parameters have identical structures: They comprise a unique parameter name within a level (or list), a data type, and a result value.
|
---|
List Display
An example of result display in list format is the Date/Time Show action, which determines the current date and time. This action returns a total of 11 results, including information like the day, year, milliseconds, and the weekday name. The following figure demonstrates the action both before and after execution. Prior to starting the script, all output parameters are visible, and their values are automatically filled in as soon as the action executes. This approach allows the user to choose which value to read and utilize for further processing at any time. Such flexibility facilitates efficient and customizable use of the generated information.
Figure: Displaying the ActionStep results as a list
Table Display
Displaying results in table form is effective for actions that aim to present uniformly structured data records from a result set. For instance, the Directory Get Files action returns data records comprising File, File Size, Creation Time, Last Write Time, and optionally the hash value. These individual records are sequentially indexed starting from zero (e.g., File 0, File 1, up to File n).
At times, an ActionStep may return several hundred result rows. Since XenoGuard cannot display all these rows simultaneously, they are presented in paginated views. This can be identified by the page icons located to the right of the root nodes, as seen in the 'Files' node in the example above. Using the small navigation buttons, you can move forward and backward through the pages or jump directly to the beginning or end of the results. Additionally, there is an option to copy the entire result set to the clipboard. |
---|
Tree Display
The most intricate form of display is the tree view, which allows individual result parameters to encompass further sub-elements. There is no limitation on the depth of levels (sub-nodes), enabling the display of extremely complex, nested structures. This display form is particularly advantageous for REST/JSON data structures. An example is the Network REST Request action, which executes a REST request. The results of this request are displayed in a tree structure under the Items node. In the illustrated example, the result includes two nodes, location and current. Under current, there is a condition sub-node containing further elements.