Can I build a constraint with conjunction of sub-constraints with columns in BRMS decision tables?
Issue
- Some Constraints (part of a pattern) can have multiple Constraints inside. For example, an OOPath Constraint can have parts with "{" + Constraints + "}".
And if such Constraints contain optional Sub-Constraints depends on rules (row) in the decision table.
for example, If a full Pattern (conditional element) is $m:Message(status == @1, $i: /internalFacts{x1 == @2, x2 == @3}) then,
case-1) only @1 is not specified, it should be generated as $m:Message($i: /internalFacts{x1 == @2, x2 == @3})
case-2) only @2 is not specified, it should be generated as $m:Message(status == @1, $i: /internalFacts{@3})
case-3) both @2 and @3 is not specified, it should be generated as $m:Message(status == @1)
An idea is adding a row to add conjunction level.
I attached Sample.xls file has below RuleTables.
the 1st RuleTable defined by "from" syntax and it works.
the 2nd RuleTable defined by OOPath syntax and it works as well as the first RuleTable but this way is very painful to maintain.
the 3rd (fake) RuleTable for explanation of this feature extension.
OR constraint is also conjunction of sub-constraints,
As OR's separator is not "," but "||", I'd like to ask another (optional) RFE for below syntax as well if its appropriate.
OR( constraint_1, constraint_2, ... )
User can add such "static function for OR", but if its appropriate to handle in language level as
to be compiled as appropriate Rete/Phreak nodes, it's better to be an extension for language.
Environment
- Red Hat JBoss BRMS
- 6.4.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
