decisionhello simple question

Skip to first unread message

Ronald Eng

Apr 12, 2016, 8:18:17 AM4/12/16
to OpenRules
When running the example DecisionHello from the run batch file using all sample data and configurations, the results txt file contains output from only the first customer, Robinson.

Is the run code supposed to loop through each customer row in the Data Customers customers table until the end of the table?

I apologize if this is a really basic question, but I'm not a java programmer, more of a predictive analytics dude looking to complement modeling with decision rules management.



Apr 12, 2016, 8:49:48 AM4/12/16
to OpenRules
Hi Ronald,

This is a good, practical question and OpenRules provides special Test Harness oriented to business people (not necessarily programmers). Usually you create several test objects using Excel tables of the type "Data" -  you have an example of these objects in DecisionHello/rules/include/Data.xls (attached). It defines two test-customers Robinson and Smith but the first one was selected for the default test. It was done in this particular case inside the method "getCustomer()" that returns customers[0]. The basic example DecisionHello did not use our Test Harness and to execute different tests you need to change getCustomer() in the file Data.xls.

We recommend you to look at the example DecisionPatientTherapyTest when we have several test objects Patient and Visit - see the attached DecisionPatientTherapy.xls. Additionally to Data tables we defined one table "testCases" of the standard type "DecisionTableTest". For each test case it lists objects to be used for testing and also expected results. When you run the decision using the method decision.test("testCases") it executes ALL tests from this table, compares actual and expected results, and reports mismatches if any. You may read more about Decision Testing at the User Manual p. 31. The detailed description of this use case can be found in this tutorial.

If you have any issues, we would be glad to help.

Reply all
Reply to author
0 new messages