Generic Test Application for Xholon

What is it

This simple application demonstrates and tests some core internal functions of the Xholon runtime framework. To see the code that calls these functions, look at toString() in XhGeneric.java.

This application also shows how to add new nodes to the composite structure tree. See the act() function in XhGeneric.java.

How to use it

Run it:

  1. Run the Java application (org.primordion.xholon.app.Xhn.java), and select File --> Open --> Generic --> Generic_xhn.xml.
  2. Expand the Model node in the tree, and then the CompositeStructureHierarchy node.
  3. You will now see a hierarchy of nodes called node_0, node_1, ..., node_11.
  4. Click on any node to see information about that node at the bottom of the Xholon window.
  5. The information will vary depending on the value of TestNumber in the Generic_xhn.xml file.
  6. Expand the Controller node in the tree.
  7. Press the Start node.
  8. The application will now add additional nodes to the tree.
  9. Press the Refresh node to update the view.
  10. Re-expand the Model and CompositeStructureHierarchy nodes.
  11. You will see a number of new nodes, shown as children of node_0.
  12. Click on any of these nodes to see information about it at the bottom of the window.

Specify which test to run:

  1. Open the configuration file Generic_xhn.xml.
  2. Edit the TestNumber param, chaning the value field to a number between 1 and 13.
  3. Save the file.
  4. Exit from the Xholon application.
  5. Rerun the Generic Test Application as described above.

Things to notice

The simple GUI does not automatically update the view. You must click on the Restart node to do this.

Dynamically added new nodes have IDs starting with the next unassigned ID. The various unnumbered nodes (such as Application, Model, etc.) are given IDs, but these are not shown in the GUI.

The Reset node under Controller does not currently work. It is intended to restart the current application.

The GUI can only run one application. You must exit and re-run it to load another application.

In Generic_xhn.xml, the UseDraw parameter is set to true. This causes a simple text-based tree to be drawn in the console window. Only the first letter of each node name is shown.

Things to try

Try all 13 cases.

One new node is added each time the act() function is called for node_0. The number of new nodes can be controlled by varying the MaxProcessLoops parameter in Generic_xhn.xml.

Extending the model

You can test different Xholon functions by adding additional cases to toString().

Xholon features

See above for various Xholon features.

Credits and references

This application only tests internal features of Xholon.