Re: [rules-users] Updation of variables within rule table and use of it in other rule table

2012-07-12 Thread Wolfgang Laun
Two options when using update or modify: (a) add a Condition x,b == null (or some other value representing "undefined") to the rule in X (b) add rule attribute "no-loop true" to the rule in X -W On 13/07/2012, debchamps wrote: > RuleTable X > Condition Action >

Re: [rules-users] Is it possible to serialzie the stateful session without stoping executing rules?

2012-07-12 Thread chrisLi
Thank you very much, laune -- View this message in context: http://drools.46999.n3.nabble.com/Is-it-possible-to-serialzie-the-stateful-session-without-stoping-executing-rules-tp4018645p4018648.html Sent from the Drools: User forum mailing list archive at Nabble.com. __

[rules-users] Updation of variables within rule table and use of it in other rule table

2012-07-12 Thread debchamps
RuleTable X Condition Action x.a == $1 x.b = $param 1 2 RuleTable Y ConditionAction x.b == $param System.out.println("HELL

Re: [rules-users] Is it possible to serialzie the stateful session without stoping executing rules?

2012-07-12 Thread Wolfgang Laun
Serializing any amount of data while other threads might change that data entails the risk of creating an inconsistent snapshot. Mutual exclusion (locking) would be one way, but since there's no progress during this time anyway you might as well stop the session. If you have the memory, serialize

[rules-users] Is it possible to serialzie the stateful session without stoping executing rules?

2012-07-12 Thread chrisLi
Hi, droolers, I need to serialize the session as a snapshot at 23:00 pm every day. So I want to do the serialization work in a different thread with session execution. Is it possible? Or is there any risk? Thank you very much -- View this message in context: http://drools.46999.n3.nabble.c

Re: [rules-users] Serialization issue with StateKnowledgeSession

2012-07-12 Thread chrisLi
, I looked into Marshaller's API, and find the following method: StatefulKnowledgeSessionunmarshall(InputStream stream, KnowledgeSessionConfiguration config, Environment environment) which can take a KnowledgeSessionConfiguration parameter. With it we can configure the deserialized state

[rules-users] Serialization issue with StateKnowledgeSession

2012-07-12 Thread chrisLi
Hi, all I have a requirement to serialzie a stateful session as a snapshot. private void serialize(OutputStream out) throws IOException{ System.out.println("writing"); DroolsObjectOutputStream droolsOut = new DroolsObjectOutputStream(

Re: [rules-users] Planner - Initialized solution & local search

2012-07-12 Thread Garf
I figured out the problem. DefaultSolver.runSolverPhases() will go through each phase, and will revert the changes if they're not better. Or, more exactly, here are lines 191-193: if (it.hasNext()) { // solverScope.setWorkingSolutionFromBestSolution(); } N

Re: [rules-users] Compiled rules differ KnowledgeAgent vs ResourceChangeScanner

2012-07-12 Thread lhorton
I did a bad job of linking in the spreadsheet in my prior post, but it seems to show up ok as link, though it's in the midst of the code snippet. I wanted to mention, lest people think I don't know how to set up Spring configs, that my spring xml loads dozens of rules files containing thousands of

Re: [rules-users] Compiled rules differ KnowledgeAgent vs ResourceChangeScanner

2012-07-12 Thread lhorton
I did some more research on this problem but am at a loss for an answer. I'd appreciate any further ideas for troubleshooting. I added some code to my server to display the fields of one of the rules that does not run until it is reloaded by the resource change scanner. I captured the field va

Re: [rules-users] Change Scanner does not start

2012-07-12 Thread Antonio Anderson Souza
Dear All, I discovered why the rules stopped working after ChangeScanner starts the problem is the issue JBRULES-2947 . To fix the problem I changed my models to a POJO package instead of the Des

Re: [rules-users] FireUntilHalt

2012-07-12 Thread crajor
Thanks for your comment, Edson. I have been using 5.3.0.Final. I could easily move to 5.4.0.Final but I don't see any of the 5.4.x branches at Maven Central. Is there another repository that has more up to date releases? Craig -- View this message in context: http://drools.46999.n3.nabble.com

Re: [rules-users] simple Doubt..usage of modify

2012-07-12 Thread abhinay_agarwal
ok..i get it !!! thanks for the help laune !! -- View this message in context: http://drools.46999.n3.nabble.com/simple-Doubt-usage-of-modify-tp4018614p4018636.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
this is the exact code : rule "Not Threshold Rule" salience -3 agenda-group "default" no-loop //lock-on-active true dialect "mvel" when $a : AccountStatusVO() $h : HashMap(!(this["Aggregate_Balance"]<=5)) then drools.setFocus("customer"); droo

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
hey laune, yeah yu are very correct in rule 3, i m using something as insert($i.tertiaryCustomerMapping($h)) coz i need a part of the map for further calculations...(calling other rules from rule 3) so now what i can do is to use retract($h)...after the insert($i.tertiaryCustomerMapping($h))

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread Wolfgang Laun
You must have more than one Account or more than one HashMap in your Working Memory. Other than this, there's no way rule 1 can fire a second time. -W On 12/07/2012, abhinay_agarwal wrote: > STACK [MAIN] > > when initially the focus is set on agenda-group "1" , rule 1 fires...and it > should g

Re: [rules-users] simple Doubt..usage of modify

2012-07-12 Thread Wolfgang Laun
Without modify (or update) the Drools Engine is not aware of the change caused by the setter. See the Expert manual for further details. -W On 12/07/2012, abhinay_agarwal wrote: > what is unclear in my mind is, if we can use something like this : > > when >$c: Customer() > then > $c

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
STACK [MAIN] when initially the focus is set on agenda-group "1" , rule 1 fires...and it should get fire..since its salience value is greater than that of rule "2".. STACK [MAIN, 1] now when the agenda group is set to 2, rule 3 will fire...itzz al ok.. STACK [MAIN, 1, 2] since rule 3 has no-lo

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread Michael Anstis
So you're saying a knowledge base consisting of only the following causes rule 1 to re-fire? rule "rule1" agenda-group "1" salience 0 when $a : Account() $h : HashMap(!(this["Aggregate_Balance"]<=5)) then setFocus("2"); end Is it *re-firing* or firing for ea

Re: [rules-users] simple Doubt..usage of modify

2012-07-12 Thread abhinay_agarwal
what is unclear in my mind is, if we can use something like this : when $c: Customer() then $c.setName("abhinay") then y do we use: when $c: Customer() then modify($c) { setName("abhinay") } I simply dont get the difference !! -- View this me

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
m still working on it..but those rules will not change anything on which rule "1" depends.. for the time being you can ignore that rule "2" has a setFocus.Consider the rule "2" as rule "rule2" agenda-group "1" salience -1 when $c : Customer() then $c.setName("Abhin

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread Michael Anstis
What rules are in agenda-group 3? On 12 July 2012 09:58, abhinay_agarwal wrote: > rule "rule1" > agenda-group "1" > salience 0 > when > >$a : Account() >$h : HashMap(!(this["Aggregate_Balance"]<=5)) > > then > setFocus("2") > end > > > > rule "rule2"

Re: [rules-users] simple Doubt..usage of modify

2012-07-12 Thread Wolfgang Laun
On 12/07/2012, abhinay_agarwal wrote: > i had already read about it, but did not get a clear picture..so raised the > question here.. If you could pinpoint the mistiness it might be possible to clear it up. -W > > Thanks, > Abhinay > > -- > View this message in context: > http://drools.46999.n3.

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
rule "rule1" agenda-group "1" salience 0 when $a : Account() $h : HashMap(!(this["Aggregate_Balance"]<=5)) then setFocus("2") end rule "rule2" agenda-group "1" salience -1 when $c : Customer() then setFocus(3) end rul

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
i am not using rule 2 or rule 3 to modify anything on which rule 1 depends.. thanks, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Rule-refiring-issue-tp4018618p4018624.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread Michael Anstis
> or do yu need more data ?? Rules 2 and 3 in their entirety would be a good starting point. On 12 July 2012 09:27, abhinay_agarwal wrote: > rule "rule1" > agenda-group "1" > salience 0 > when >$a : Account() >$h : HashMap(!(this["Aggregate_Balance"]<=5)) > t

Re: [rules-users] Customizing Drools Guvnor

2012-07-12 Thread Michael Anstis
Read the Guvnor user guide? On 12 July 2012 07:52, arup wrote: > Hi all, > > Can u tell me how can i add a fresh rule using Rest api to the > guvnor??? > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Customizing-Drools-Guvnor-tp4018616.html > Sent from the Drools:

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
rule "rule1" agenda-group "1" salience 0 when $a : Account() $h : HashMap(!(this["Aggregate_Balance"]<=5)) then setFocus("2") end rule "rule2" agenda-group "1" salience -1 when //something then //something end rule "rul

Re: [rules-users] simple Doubt..usage of modify

2012-07-12 Thread abhinay_agarwal
i had already read about it, but did not get a clear picture..so raised the question here.. Thanks, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/simple-Doubt-usage-of-modify-tp4018614p4018620.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Rule refiring issue !

2012-07-12 Thread Wolfgang Laun
Rewrite this post without confusing mistakes: "rule1" is duplicate. Also, not showing the LHS conditions and RHS actions makes it impossible to say what causes which rule to (re-)fire. -W On 12/07/2012, abhinay_agarwal wrote: > hey all, > > i have a scenario like this.. > > rule "rule1" > agen

[rules-users] Rule refiring issue !

2012-07-12 Thread abhinay_agarwal
hey all, i have a scenario like this.. rule "rule1" agenda-group "1" salience 0 when //something then setFocus("2") end rule "rule1" agenda-group "1" salience -1 when //something then //something end rule "rule3" agenda-group "2" salience 0 when //somet

Re: [rules-users] Planner - Initialized solution & local search

2012-07-12 Thread Geoffrey De Smet
Op 11-07-12 21:56, Garf schreef: re: /Double check if you aren't calling afterEntityAdded() on the non-initialized entities too. Also check that the construction heurstics run before the localSearch solver does (the order in which they are declared in the config xml matters)./ Checked both. I