The downloaded workspace “openrules.samples” includes various examples of decision models that you can build, test, debug, and deploy. See examples of decision models here. They provide good prototypes for your own operational decision models.
Building Decision Model
After you complete the design of your decision model and define its properties in the file “project.properties“, you need to build it by a simple double-click on the standard file “build.bat” or “run.bat“. It will automatically transform all Excel tables to Java packages placed in the folder “target”. Nobody ever should modify the generated files as they will be automatically regenerated when you make changes in your Excel-based model. You even don’t have to look at them – they are simply will be used by the Decision Manager internally to test and deploy your model.
OpenRules Decision Manager keeps track to the original Excel tables, and produces all messages and explanations in the business terms used in Excel.
Testing Decision Model
When you design your decision model, you usually also create a set of test-cases in Excel (see Test.xls in samples). You can execute your decision models against these test-cases by a simple double-click on “run.bat“. Decision Manager will execute your model and will produce a user-friendly protocol with the execution results.
Along with the execution protocol, Decision Manager also produces the explanation reports in the folder “report” using a friendly HTML format. It shows all executed rules and values of the involved decision variables in the moment of execution.
Debugging Decision Model
You may run your decision model in the debug mode by adding the property “debug=On” to your project.properties file. The execution will automatically stop at the beginning and will display on the console “>” asking you to enter a debug command. If you just click <Enter> it will execute the next rule, will show the value of the involved variables and stop again. This way by just clicking <Enter> you may debug your model rule-by-rule. At any moment, you may also enter the following commands:
See example of decision model debugging in this post.
Note. You may test your decision model from a Java class such as vacation.days.Luancger.java in the sample “VacationDays”. In this case, you need to add property “run.class=vacation.days.Launcher” to your file “project.properties” and run.bat will execute this Launcher instead of the standard OpenRules tests.