Forcing rule evaluation for unknown attributes and non-existent entities...
Hello all,
I have another potentially easy question for the OPA gurus in this forum - there must be a simple explanation for this issue but I'm just not seeing it.
The issue that I am encountering with many of my rules is that the conclusion is not evaluated due to either non-existent entity instances, or unknown entity attributes. As an example of the the first scenario, I have a rule that is checking for the existence of an instance of an entity with a certain type and status. The conclusion is only evaluated though if there is at least one instance of that entity, otherwise the conclusion remains unknown.
Similarly, I have written an equation to annualize all (financial) obligations for a case, where the frequency of the obligation could be weekly, bi-weekly, monthly, etc. I have created an attribute for each frequency type, which are then summed in the equation. The issue in this example is that the equation does not conclude if there isn't a value present for every attribute in the equation. For example, if:
attribute 1 = A + B + C
where A = 1, B = 2, and C is unknown, attribute 1 does not evaluate to 3 but will remain unknown. Logically, I would expect that the absence of a numeric attribute value to default to 0 rather than unknown, but this is not the case.
I have looked at the "Certain and known operator rule examples" Help topic to try to understand how to assign a value to an unknown attribute, but the example at the bottom of the topic page doesn't provide sufficient explanation as to how the logic works:
the team's game point total = the team's points from round 1 + the team's points from round 2 + the team's points from round 3
the team's points from round 1 = 0 if
the team's points from round 1 (as recorded by the team) is unknown
the team's points from round 2 = 0 if
etc.
It seems from the example that there are 2 attributes used for the same variable: [the team's points from round 1] and [the team's points from round 1 (as recorded by the team)]. It's not clear to me how the original equation can conclude if the values are recorded in the alternate attributes [the team's points from round 1 (as recorded by the team)] etc.
I've also considered using rule fragments per the Help topic "Prove an attribute using multiple rules", so that I could use two separate equations to set the value of an attribute depending on the circumstance, i.e.:
attribute 1 = A + B + C
attribute 1 = 0 if
attribute 1 is unknown
This attempt produces a Logical Loop error, presumably because I am attempting to set the value of an attribute based on the same attribute's value.
Any help will be greatly appreciated!
Philip