As for not duplicating RHS code: There's DRL functions, which (when returning void) can play the role of old-fashioned procedures.
-W
Rules do not "call" other rules. A rule can change the value of an object in working memory, and if another rule is triggered by that change (it's conditions are matched) then that other rule could fire. This is done without calling the subsequent rule directly. You do need to notify the rule engine that the object has changed, though, and that's done in Drools using the update or modify statements in the action portion of the rule. http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html_single/index.html#d0e5906
--- On Sat, 7/9/11, Roger Smith <rogersmith1711@gmail.com> wrote:
From: Roger Smith <rogersmith1711@gmail.com>
Subject: [rules-users] One rule calling another rule
To: "Rules Users List" <rules-users@lists.jboss.org>
Date: Saturday, July 9, 2011, 12:27 AM-----Inline Attachment Follows-----
I am involved in a project in which one rule needs to call another re-usable rule. Have anyone had experience using Drools to support such cascaded rules? If yes, any pointers as to how to do it?Roger_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users