Starting with version 0.5 of the Logic Module, users may define rules, which are saved in the database. The logic module has built-in support for writing rules in Groovy and Java, while other modules may add other languages by overriding the org.openmrs.logic.rule.definition.LanguageHandler interface.
At present you have to look in your server logs to see compile errors if you've written a rule incorrectly.
Groovy Rules
When defining a Groovy rule, you are defining the contents of the rule's eval method. Precisely, the code you are writing is enclosed in
...