Reference‎ > ‎

Rules cheat sheet

Here are a few points that bear remembering:

Rules methods must be public

If the method is not pubic, you will likely get an exception about not being able to find that method.

Actions must use LogicContext

Any Action rule that creates, updates or deletes persistent objects must use the corresponding LogicContext method, and not Hibernate's Session interface. This will ensure that these changes trigger the appropriate rules.

More specifically, any insert, update or delete must be done using LogicContext.insert(), LogicContext.update() or LogicContext.delete().

In addition, any updates (including to the current object) must be preceded by a call to LogicContext.touch( ). Failure to do so will result in an exception on commit.

Comments