Find the cause of a logic error

Find the cause of a logic error

Sometimes when debugging, an inferred attribute may have a different value from what you expected based on the input data. In this case you will want to see the decision that led to the value. To understand a decision:

  1. Select the attribute in the Data view, right-click and select Show Decision. (If there are multiple values for the attribute, you also have the option to show the decision for a particular value from that change point.)
  2. The decision report for this attribute is shown in the Decision view, in which you can also show the relevant rule. (If you have opted to show the decision for a particular value, the Decision view will limit the relevance period for the decision tree to the period from the current change point to the next change point for the attribute. In other words, only attributes relevant to proving the value of your chosen goal within the relevance period, will be displayed in the Decision Report. Note, however, that any attribute which is displayed in the Decision Report, will display its whole timeline in {curly brackets} after the attribute text, and not just the portion of the timeline which is relevant to proving the value of your chosen goal within the relevance period.)

 

When you review the reasons for a decision, you might uncover a logic error in your rules. To update your rule:

  1. Firstly, save your debugger session so that you will be able to retest any changes that you make to the rulebase. (For more information, see Change a rule while debugging.)
  2. Find the rule in your rules document. (For more information, see Find rules that use an attribute or relationship.)
  3. Make the necessary changes to the rule.
  4. Compile your rules.
  5. Start the debugger and import your saved session data.
  6. Check that the rules now operate as expected and produce the right decisions based on the test data.

 

You can also use the Rule Editor in Oracle Policy Modeling to check the underlying logic of a rule. To view a rule in the Rule Editor:

  1. In the Project Explorer, right-click the rules document and select Open Generated Rules.
  2. On the Rules tab, locate the rule that you want to investigate.
  3. Double-click it to open the Rule Editor for that rule.
  4. If you want to make a change to the rule, click the View in Word or View in Excel button.