Extending Able

The Agent Building and Learning Environment uses a building-block architecture based on Java Beans to encourage reuse and inheritance. Able provides core beans for text file i/o, data transformation, neural networks, and fuzzy and boolean reasoning. By extending base Able classes, your algorithm becomes a custom bean capable of interacting with any Able Bean through synchronous and asynchronous events, data connections, and bean property changes. Your application can use Able's User-defined Functions to make direct calls to other application methods, and for other applications to call your methods.

If you package your classes as beans in a Java Archive (JAR) file, your bean can be plugged into the Able Agent Editor's interactive development environment where you can build and debug an application consisting of multiple beans and connections. After implementing a customizer, you can change data values and debug in the Agent Editor. You can use Able inspectors, or provide an inspector, to view data values as your algorithm processes data to experiment and test your application. While in the editor you can also manipulate other beans; for instance, you can train neural networks and create rule bases. Your application can be saved in a serialized file and later restored in the Agent Editor or in your own application.

In Extending Able, the focus is on how to make your algorithm an AbleBean and plug it into the Able Agent Editor. Two examples are followed:

  1. SimpleAbleBean, a simple example which illustrates how an object's data members can be updated with Able's data buffers.
  2. AbleFileWatcher, a more complex example which uses Able's timer event processing and provides more detail in how bean customizers, or editors, are created.

A basic level of familiarity with Java is assumed.

Steps to Create an AbleBean

Here are the steps needed to produce an AbleBean to extend and plug into Able:

  1. Set up a Java development environment so you can create, edit, and compile Java source.
  2. Understand the Java Beans design that Able uses; review Sun's tutorial at http://java.sun.com/docs/books/tutorial/javabeans/index.html.
  3. Browse Designing Able Applications so you understand the design issues and options available for processing and relationships between beans.
  4. Review the examples provided in SimpleAbleBean and SimpleAbleAgent.
  5. Create a Java class for your algorithm that implements the methods defined in the AbleBean interface or extends one of the base Able classes that implements AbleBean. Here are some guidelines on coding too.
  6. Create a BeanInfo class for your AbleBean to define its properties.
  7. Create a Customizer for your AbleBean so its data can be edited with the Able Agent Editor.
  8. Create an Inspector to display data members of your AbleBean during processing within the Able Agent Editor.
  9. Package your code in a Java Archive (JAR) file, identifying it as a bean with a manifest list.
  10. Plug your class files into the Able Agent Editor.
  11. Deploy your application.

References

The Able User Reference, distributed with the Able package and installed at a URL such as file:///C|/able_1.5.0/reference/com/ibm/able/doc-files/index.html, contains this topic; it is also available as a PDF file for ease of printing but the PDF version will contain no images. For related information, see:

Feedback

If you have comments about these instructions, please send them to ableinfo@us.ibm.com so that we can make improvements.