javadroolsjava-ee-6rule-engineredhat-brms

Why rules engine instead of easily comprehensible one line property?


I am a newbie with the rules engine, so bear with me if this question is very basic. All the tutorials for rules engines have been saying that you can move your business logic outside your code and get it updated by BAs/ end users instead of putting it inside Java code.

I have the following questions

  1. But why can't we write our code to read values from property files and do the same thing?

  2. Also, the rules files seem to have a syntax which is not simply one-liners, compared to .properties files.

  3. Does putting these rules in Rule engine make the code/app work without requiring an app server restart?

    3a. If it does NOT, then how can we achieve it?


Solution

  • Had been doing some reading the last few days and I think (it is IMHO), the capacity for allowing business rules to be updated using simple spreadsheets, gives Rules Engines the edge over property files. I can make property files as highly configurable as possible using multiple properties and instructions for modifying rules as comments under each property.

    But in a scenario where the business user is able to directly configure the application to apply values based on a "decision table" in a spreadsheet, then that solution will be more desirable.

    If any other (budding) developer looking for justification on the for the need of Rule Engines is convinced with this answer, please leave a thumbs up!