I was just going through the BRM tutorial center on SDN and I studied the documents on rule creation using Java classes and xsd. From my point of view the mechanism using xsd seems very straight forward and easy to understand as decision tables are used. This fulfills the promise of externalising business rules and giving business users the possibility to maintain them.
I'm not quite sure whether I completely understand the Java based method though. Below a very brief summary of the buyer discount example and my understanding:
1) First a Java class is created This class is comprised of attributes and methods which are able to set and retrieve the attribute values.
2) A business rule is created. By adding our previously created Java class as a class alias we have the possibility to access the classes attributes and methods in the actual rules.
3) Rules are modeled utilising the methods of the java class
4) At runtime the rules engine is invoked from a JSP which instantiates an object of the class we created in step 1. Using the setter methods the objects attributes are set and the object is passed to the rule engine which is subseqhently invoked.
5) The rule engine executes the actual rules and sets an attribute of our object which was passed in step 4
6) the value set in step 4 is retrieved by the calling application.
Is my understanding in general correct ? When would I use the java class method and when the decision table ? From what I can understand the example in the tutorial (buyer discount) could have also been modeled using a decision table. Is increased flexibility compared to decision tables the reason ?. How does the java class method relate to the promise of giving business users the possibility to maintain rules ? I can' t see business users changing the java classes
thanks for ayn helpful input