Flowcharts
- Last Updated: March 24, 2022
- 2 minute read
- Corticon
- Version 6.3
- Documentation
A flowchart that captures these two rules might look like the following:
Upon closer examination, the flowchart reveals two problems with our rules:
what happens if Person.age>55 or if Person.smoker=false? The rules built in
Simple rules for profiling insurance policy applicants do not
handle these two cases. But, there is also a third, subtler problem here: what happens if
both conditions are satisfied, specifically when Person.age<=55
and
Person.smoker=true? When Person.age<=55, Person.riskRating should
be given the value of low. But, when Person.smoker=true, Person.riskRating should be given the value of high.
There is a dependency between our rules: They are not truly separate and independent evaluations because they both assign a value to the same attribute. So, the flowchart turns out to be an incorrect graphical representation of the rules, because the decision flow does not truly follow two parallel and independent paths. Let's try a different flowchart:
In this flowchart, an interdependence between the two rules was
acknowledged, and they were arranged accordingly. However, a few questions still exist. For
example, why is the smoker rule before the age rule? By doing so the
smoker rule has an implicit priority over the age rule because any smoker is immediately
given a riskRating value of High regardless of what their age is. Is this
what the business intends, or are we, as modelers, making unjustified assumptions?
This is a problem of logical conflict, or ambiguity, because it is not clear from the two rules, as they were written, what the correct outcome should be. Does one rule take priority over the other? Should one rule take priority over the other? This is, of course, a business question, but the rule writer must be aware of the dependency problem and resulting conflict in order to ask the question in the first place. Also, notice that there is still no outcome for a non-smoker older than 55. This is a problem of logical completeness and it must be taken into consideration, no matter which flowchart is used.
The point is that discovery of logical problems in sets of rules using the flowcharting method is very difficult and tedious, especially as the number and complexity of rules in a decision (and the resulting flowcharts) grows.