Praecipia™: The XML Rule Engine Behind Premirus Products
What is a Rules Engine?
A rules engine is, at its simplest, a component that analyzes incoming data and takes actions based on the content of that data. The analysis can be simple, such as looking for required values or comparing values, or very complex, such as comparing values in the incoming data to values in another data source, such as a dataset. The actions taken can also range from the very simple to the very complex. Common actions include:
  • Enforcement of required values or value range constraints by rejecting incoming data that does not meet required criteria,
  • Routing incoming data based upon its contents,
  • Sending notifications to users or other systems that data has been received,
  • Modifying the data contents based on rules, and
  • Applying organizational business logic to incoming data.
Using a rules engine gives you the power to integrate your business process and your existing applications into a new, dynamic environment, enabling increased productivity and lowering the risk of lost information.
The Premirus Praecipia™ Rules Engine
The name Praecipia™ comes from the Latin word Praecipio, meaning to advise and anticipate. This is exactly what Praecipia™ does... anticipates the needs of the organization and provides an advised route for the data through the organization’s systems.
The Premirus Praecipia™ rules engine is a highly flexible and extensible rule engine designed to provide maximum functionality in the widest possible array of environments. With Praecipia™, you may provide any format of XML data as a data input. By using the provided extension components, you may also use Praecipia™ to process comma delimited data files, column aligned data files, and other non-XML data sources. Rules for Praecipia™ are written in a simple and intuitive XML format. Rules may be placed in rule XML files, application configuration files, or in a database.
The Praecipia™ rules engine utilizes an advanced predicate calculus-based architecture to organize rules and apply those rules to data. Despite the complexity of the engine itself, the creation and application of rules is simple and elegant. Developers and business analysts can create basic XML rule sets that apply rules take predefined actions, while more advanced developers can extend the rules engine to provide a vast array of functional capabilities with minimal development effort.
This documentation set is designed to provide the information needed to create basic rule sets utilizing the basic functionality set that is delivered with the Edoctus™ Document Management System Workflow Edition. For more information on developing extension components for the rules engine, see the API documentation elsewhere in this online help system.
Conceptual Discussion
Rule-based development is a widely utilized technique for creating so-called “expert systems.” In this development methodology, rules are used to represent heuristics, or "rules of thumb," which specify a set of actions to be performed in a given situation. An individual rule is composed of an if portion and a then portion. The if portion of a rule is a series of patterns which specify the facts (or data) which cause the rule to be applicable. The process of matching facts to patterns is called pattern matching. The expert system tool provides a mechanism, called the inference engine, which automatically matches facts against patterns and determines which rules are applicable. The if portion of a rule can actually be thought of as the whenever portion of a rule since pattern matching always occurs whenever changes are made to facts. The then portion of a rule is the set of actions to be executed when the rule is applicable. The actions of applicable rules are executed when the inference engine is instructed to begin execution. The inference engine selects a rule and then the actions of the selected rule are executed (which may affect the list of applicable rules by adding or removing facts). The inference engine then selects another rule and executes its actions. This process continues until no applicable rules remain.