Re: [rules-users] Should update be called moving from one rule task to another in a ruleflow
No matter the ruleflow-group, all your rules are running in the same session. If you modify the attributes of a fact, you must notify it to the session (if you want to make inference with this new value). For doing so you can use update() or modify(), they will have the same result. Best regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2011/7/13 Wishing Carebear wishing.careb...@gmail.com modify ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Should update be called moving from one rule task to another in a ruleflow
Thanks Esteban, Noticed that if I have an employee with the list of addresses and update an attribute of the address item in the list, modify does not work and the update needs to be called explicitly on the Employee to take effect. Is this expected. 2011/7/14 Esteban Aliverti esteban.alive...@gmail.com No matter the ruleflow-group, all your rules are running in the same session. If you modify the attributes of a fact, you must notify it to the session (if you want to make inference with this new value). For doing so you can use update() or modify(), they will have the same result. Best regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2011/7/13 Wishing Carebear wishing.careb...@gmail.com modify ___ 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] Should update be called moving from one rule task to another in a ruleflow
I believe there was some talk of this recently (on perhaps the drools-dev mailing list). IIRC it concluded that this was the expected (system) behaviour of not necessarily the expected (user) behaviour. 2011/7/14 Wishing Carebear wishing.careb...@gmail.com Thanks Esteban, Noticed that if I have an employee with the list of addresses and update an attribute of the address item in the list, modify does not work and the update needs to be called explicitly on the Employee to take effect. Is this expected. 2011/7/14 Esteban Aliverti esteban.alive...@gmail.com No matter the ruleflow-group, all your rules are running in the same session. If you modify the attributes of a fact, you must notify it to the session (if you want to make inference with this new value). For doing so you can use update() or modify(), they will have the same result. Best regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2011/7/13 Wishing Carebear wishing.careb...@gmail.com modify ___ 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
Re: [rules-users] Should update be called moving from one rule task to another in a ruleflow
Thanks Michael. On Thursday, July 14, 2011, Michael Anstis michael.ans...@gmail.com wrote: I believe there was some talk of this recently (on perhaps the drools-dev mailing list). IIRC it concluded that this was the expected (system) behaviour of not necessarily the expected (user) behaviour. 2011/7/14 Wishing Carebear wishing.careb...@gmail.com Thanks Esteban, Noticed that if I have an employee with the list of addresses and update an attribute of the address item in the list, modify does not work and the update needs to be called explicitly on the Employee to take effect. Is this expected. 2011/7/14 Esteban Aliverti esteban.alive...@gmail.com No matter the ruleflow-group, all your rules are running in the same session. If you modify the attributes of a fact, you must notify it to the session (if you want to make inference with this new value). For doing so you can use update() or modify(), they will have the same result. Best regards, Esteban Aliverti - Developer @ http://www.plugtree.com http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2011/7/13 Wishing Carebear wishing.careb...@gmail.com modify ___ 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
Re: [rules-users] Should update be called moving from one rule task to another in a ruleflow
Any pointers please!! On Tuesday, July 12, 2011, Wishing Carebear wishing.careb...@gmail.com wrote: Any pointers? On Tuesday, July 12, 2011, Wishing Carebear wishing.careb...@gmail.com wrote: Hi, If I have a ruleflow with a sequence of rule tasks, should an update be called to reflect the state of the fact in the working memory? In another words If all the rules are mutually exclusive within a rule task, will the changes made in first rule task, if used as a condition in the next rule task will be reflected without calling explicit update. Thanks for your time and help. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Should update be called moving from one rule task to another in a ruleflow
How about show your code and rules and maybe relevant parts of your process? Would help understand your situation better. I would think creating a simple test case that covers your scenario would not take long to put together. Thanks. On 7/13/11 11:20 AM, Wishing Carebear wrote: Any pointers please!! On Tuesday, July 12, 2011, Wishing Carebearwishing.careb...@gmail.com wrote: Any pointers? On Tuesday, July 12, 2011, Wishing Carebearwishing.careb...@gmail.com wrote: Hi, If I have a ruleflow with a sequence of rule tasks, should an update be called to reflect the state of the fact in the working memory? In another words If all the rules are mutually exclusive within a rule task, will the changes made in first rule task, if used as a condition in the next rule task will be reflected without calling explicit update. Thanks for your time and help. ___ 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] Should update be called moving from one rule task to another in a ruleflow
PotentialTheft ruleflow-group updates a simple String attribute(potentialTheftRating) as shown below. The next step (checkTheftRating used as an example here) uses the potentialTheftRating in the condition. Note that some of the attributes are list of objects where the update is on the attribute of the contained object in the list. *//TheftRating ruleflow-group * rule Row 1 PotentialTheft.gdst ruleflow-group TheftRating lock-on-active true dialect mvel when $car : Vehicle( convertible == true ) then System.out.println( row 1 ); //$car.setPotentialTheftRating( high ); modify($car){ setPotentialTheftRating( high ); } //update($car); end #from row number: 2 rule Row 2 PotentialTheft.gdst ruleflow-group TheftRatinggrp dialect mvel when $car : Vehicle( price = 45001 , price = 20 ) then $car.setPotentialTheftRating( high ); System.out.println(row number: 2); end *//CheckTheftRating ruleflow-group* rule 1 CheckTheftRating ruleflow-group CheckTheftRating salience 100 dialect mvel when $car : Vehicle( potentialTheftRating == high ) then System.out.println( CheckTheftRating is true); end Regards, Ravi On Wed, Jul 13, 2011 at 8:28 AM, Tihomir Surdilovic tsurd...@redhat.comwrote: How about show your code and rules and maybe relevant parts of your process? Would help understand your situation better. I would think creating a simple test case that covers your scenario would not take long to put together. Thanks. On 7/13/11 11:20 AM, Wishing Carebear wrote: Any pointers please!! On Tuesday, July 12, 2011, Wishing Carebearwishing.careb...@gmail.com wrote: Any pointers? On Tuesday, July 12, 2011, Wishing Carebearwishing.careb...@gmail.com wrote: Hi, If I have a ruleflow with a sequence of rule tasks, should an update be called to reflect the state of the fact in the working memory? In another words If all the rules are mutually exclusive within a rule task, will the changes made in first rule task, if used as a condition in the next rule task will be reflected without calling explicit update. Thanks for your time and help. ___ 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
Re: [rules-users] Should update be called moving from one rule task to another in a ruleflow
Any pointers? On Tuesday, July 12, 2011, Wishing Carebear wishing.careb...@gmail.com wrote: Hi, If I have a ruleflow with a sequence of rule tasks, should an update be called to reflect the state of the fact in the working memory? In another words If all the rules are mutually exclusive within a rule task, will the changes made in first rule task, if used as a condition in the next rule task will be reflected without calling explicit update. Thanks for your time and help. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users