[
http://jira.jboss.com/jira/browse/JBRULES-600?page=comments#action_12349610 ]
Michael Neale commented on JBRULES-600:
---------------------------------------
Have an initial implementation of this, based on using an Otherwise fact
(org.drools.Otherwise) which will be automatically asserted, the fire loop retried, and
retracted when done.
This is simple, and works by only needing a "Otherwise()" declaration in the
LHS, but it could be confusing should either the LHS include more constraints, have
multiple rules, or modify working memory (so its not without its downsides).
BUT, if you can have rules that declare Otherwise() and nothing else, and its perfectly
safe. You can also have as many rules that use Otherwise() with other constraints as long
as
a) the rule action does not modify working memory or b) the other conditions to not
overlap.
There are many other much more complex ways to implement this if needed (most likely a
different type of terminal node, driven by a rule attribute).
"Otherwise" feature to catch scenarios when no rules fired
----------------------------------------------------------
Key: JBRULES-600
URL:
http://jira.jboss.com/jira/browse/JBRULES-600
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Reteoo
Affects Versions: 3.0.5
Reporter: Michael Neale
Assigned To: Michael Neale
Fix For: 3.1-m1
Original Estimate: 1 day
Remaining Estimate: 1 day
Have had a few requests for features when "otherwise" is needed. Basically, in
a rule set, when fireAllRules is called, an no "normal" rules activate and fire,
rules declared as "otherwise" will then activate, presumably to cater for
scenarios that have "fallen through the cracks" in typical business
applications.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira