What’s a Rule Engine?

(3 votes, average 5.00 out of 5)

Chameleon is a form of Rule Engine for Joomla (Wikipedia: Business Rules Engine).

There are several different types of Rule Engine. Chameleon is closest to the Event Condition Action form of rule engine, where:

  • the “Event” is any page request that is made to a Joomla page
  • the “Conditions” are logical tests that, if satisfied or evaluated to true, cause the action(s) to be carried out
  • the “Actions” are generally to change the template that will be displayed on the requested page, but also include the ability to force a page redirect, change the “default” (front) page, or to execute arbitrary PHP commands. In this way, Chameleon can actually trigger any sort of PHP code, e.g. to send an e-mail or perform logging operations.

Chameleon uses the concept of a Rule Chain — a set of rules that are applied in turn.

When a page request is received by Joomla, Chameleon gets to work very early in the process, and starts to evaluate its rules one by one.

Depending on the result of any rule, Chameleon can abort the entire chain, or keep processing rules until the last one has been processed.

  • see diagram of this process on the next page
Last Updated on Tuesday, 09 August 2011 00:27