Drools Fools

Drools rule engine example
This is a just a Drools example. Basic example: teapot rule. If error code is 418 and message is 'tea'. You can change the rules on rule admin page.
  • when ERROR_code=200 then result.message='OK'
  • when ERROR_code=418 AND message='tea' then result.message='Tea time'
  • when ERROR_code=404 then result.message='Not found'
  • Any other case rule won't run, and basic message will be UNKNOW
Incoming data form
ERROR code:
VALUE:
Result
{{ re.timestamp }} - {{ re.message }}