Eligibility

  1. In the Technical View of the editor, the list of available classes are displayed. To add more classes use the "Class" button on the Class Outline View.
  2. In the Rules Outline View of the Business view of the editor, select the "Eligibility" rule and from the context menu on the right side select Edit Rule. In the dialog which pops up, click the Change link beside the rule name. Here a new class must be selected. Select the click the Change link beside the rule name of the Rule Class and select the appropriate class. Select the radio button beside Create new rule option, enter "eligible" as the name and click Next; choose Boolean as the type and click Save.
  3. Edit the "Household Contains Eligible Person" rule in the same way. Change the rule name to be a new rule called householdContainsAnEligiblePerson of type Boolean.
  4. Within the technical View on the "Eligibility" rule diagram, open the context menu for the "Eligible Person" rule and choose Edit Rule from the menu which pops up. Choose the "householdContainsAnEligiblePerson" rule from those listed in the drop-down and click Save.
  5. Drag a Reference from the Business (default) palette over the left side element of the "Income" is greater than "0" comparison. Choose the Create a new rule option, enter "householdIncome" as the name and click Next; choose "Number" as the type and click Save. Drag a Number from the Data Type palette over the right side element of the "Income" is greater than "0" comparison. In the Value field of the properties panel enter the number "0".
  6. Update the compare elements for the "Income is less than 20000" comparison so that it becomes "householdIncome < 20000".
  7. Using the Class Button on the Class Outline view create a new class called "Person".
  8. On the "Household Contains Eligible Person" rule diagram, edit the "All the people in the household" rule. Enter "peopleInHousehold" as the name of the new rule and click Next; choose Rule Class and check the "List" checkbox. Click Next; choose "Person" as the type and click Save.
  9. Edit the "Eligible Person" rule so that its rule name is a new rule called "eligible" in the Person class, of type Boolean. You can choose the person class by using the Change link for the Current Rule Class in the edit rule wizard.
  10. On the "Household Contains Eligible Person" rule diagram, edit the "current person is eligible" rule to refer to the "eligible" rule in the Person class.
  11. In the "Eligible Person" diagram, add the appropriate elements to the comparisons to create "age < 16, age >= 16" and "age < 22" respectively, where "age" is a new rule in the Person class of type Number.
  12. Edit the "person is a student rule" on this diagram to refer to a new rule in the Person class called isStudent of type Boolean.