Re: [rules-users] How to call a another drl file from one drl file
If you want to control the order of execution or rules you will have to look into agendas or ruleflow. On Thu, 2009-07-02 at 15:36 +0530, Amila Silva wrote: hi, I have requirement to execute a chain of rules. One rule after another and they are reusable.I need to know how to call another drl file from a drl file. or in a then part of the a rule. thanks Amila Silva ___ 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
Re: [rules-users] How to call a another drl file from one drl file
Greetings: If the requirement is to control the order of execution of the rules then (to quote Dr. EF-H) you probably are using a hammer when you needed a screwdriver. Meaning that you are trying to use a rulebase for a procedural problem. There are many times that a rulebase should NOT be use and this sounds like one of the main examples of that situation. However, if you absolutely, positively insist on using a rulebase, then just give each rule a specificity or priority and they will fire in that order. SDG jco This above all: to thine own self be true, And it must follow, as the night the day, Thou canst not then be false to any man. Hamlet, Act 1, Scene III http://www-tech.mit.edu/Shakespeare/hamlet/hamlet.1.3.html [You can also replyTo: j...@kbsc.com] On Jul 8, 2009, at 9:11 AM, Corneil du Plessis wrote: If you want to control the order of execution or rules you will have to look into agendas or ruleflow. On Thu, 2009-07-02 at 15:36 +0530, Amila Silva wrote: hi, I have requirement to execute a chain of rules. One rule after another and they are reusable.I need to know how to call another drl file from a drl file. or in a then part of the a rule. thanks Amila Silva ___ 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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] How to call a another drl file from one drl file
hi, I have requirement to execute a chain of rules. One rule after another and they are reusable.I need to know how to call another drl file from a drl file. or in a then part of the a rule. thanks Amila Silva ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] How to call a another drl file from one drl file
I believe you will need to add each DRL file into a single RuleBase (Drools 4.x terminology; I think KnowledgeBase in 5.0 but I'm a little rusty). Don't forget rules aren't evaluated when fireAllRules is called but as objects are inserted into WorkingMemory, so all rules need to be compiled into a RuleBase before object insertion. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Amila Silva Sent: 02 July 2009 11:07 To: rules-users@lists.jboss.org Subject: [rules-users] How to call a another drl file from one drl file hi, I have requirement to execute a chain of rules. One rule after another and they are reusable.I need to know how to call another drl file from a drl file. or in a then part of the a rule. thanks Amila Silva ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to call a another drl file from one drl file
Michael is correct. You need to add each resource to the knowledgebase ensuring that functions needed by rules are added before the rules themselves. 2009/7/2 Anstis, Michael (M.) manst...@ford.com I believe you will need to add each DRL file into a single RuleBase (Drools 4.x terminology; I think KnowledgeBase in 5.0 but I'm a little rusty). Don't forget rules aren't evaluated when fireAllRules is called but as objects are inserted into WorkingMemory, so all rules need to be compiled into a RuleBase before object insertion. -- *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *Amila Silva *Sent:* 02 July 2009 11:07 *To:* rules-users@lists.jboss.org *Subject:* [rules-users] How to call a another drl file from one drl file hi, I have requirement to execute a chain of rules. One rule after another and they are reusable.I need to know how to call another drl file from a drl file. or in a then part of the a rule. thanks Amila Silva ___ 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