I'm building a WPF UI for configuring some complex business rules; each rule can have many conditions, so I figured I would include a drop-down list of logical operators so that the user could have the flexibility required by the business case.
Basically a rule has a logic and a behavior, and under each rule, each condition also has a logic:
Rules' behavior is one of the following:
RuleConditionsMustPass
: this means a rule is said to pass when the logical operations of all conditions under it evaluate totrue
.RuleConditionsMustFail
: this means a rule is said to pass when the logical operations of all conditions under it evaluate tofalse
.
Rules' logic can be one of the following:
And
: all rules with an "And" logic must pass.Or
: among all rules with an "Or" logic, at least one must pass.Xor
: among all rules with an "Xor" logic, only one must pass.
Similarly, conditions' logic works the same way: given a "RuleConditionsMustPass" behavior, the rule will pass if all "And" conditions pass and if among all "Or" conditions at least one passes and among all "Xor" conditions only one passes.
What I'm wondering, is whether the icons I've chosen for each logical operator make any sense from a UX point of view, and if using a TreeView for this rule configuration feature is the best approach:
Clicking the green "+" button here would add a condition under that rule; clicking the red "-" button would delete that rule. I realize the ComboBox.ItemTemplate is a bit off here, when I'm done with it I'll make sure all items in the dropdown have the same width, and I won't be using the enum names in the directly in the UI.
Answer
The icons are alright, but I would consider the terminology in general.
- OR - Same as "match any of the following rules"?
- AND - Same as "match all of the following rules"?
- XOR - Same as "match one of the following rules"? At least if there are only 2 options to pick from... If there are more than 2 it gets more complicated.
Maybe it's enough just to have Match all / match one / match any / match none to cover all options, together with the possibility to nest rules.
No comments:
Post a Comment