Client API

Client API is used to communicate with rule engines. API interfaces and classes are located in com.hammurapi.reasoning package.

Forward reasoning

The diagram above shows typical steps in working with a forward reasoning session:

  1. Obtain a reference to a reasoning session factory. This step is implementation specific and is not covered by the specification. For example, in J2EE environment it can be JNDI lookup and in a standalone application it can be instantiation of a factory class with new.
  2. Create a reasoning session.
  3. Put facts to the session.
  4. Execute rules.
  5. Retrieve conclusions from the session.
  6. Close the session.

Backward reasoning

This is a typical backward reasoning scenario:

  1. Obtain a reference to a reasoning session factory. This step is implementation specific and is not covered by the specification. For example, in J2EE environment it can be JNDI lookup and in a standalone application it can be instantiation of a factory class with new.
  2. Create a reasoning session providing an array of input fact sources. These sources can be database queries, files, other backward reasoning sessions, …
  3. Retrieve conclusions of desired type from the session. This operation can be performed multiple times for different or same conclusion types.
  4. Close the session.
Last modified: 2009/11/03 15:00 by Pavel Vlasov
   
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Locations of visitors to this page
Hammurapi Group