what is the difference if I use :
rule rule1
when
$song : Song()
then
modify($song)
{
setName(index.getAndIncrement()+_+$song.getName());
}
end
and if i use :
rule rule1
when
$song : Song()
then
Search for modify in the Drools Expert manual. No need to repeat it all here.
-W
On 12/07/2012, abhinay_agarwal abhinay_agar...@infosys.com wrote:
what is the difference if I use :
rule rule1
when
$song : Song()
then
modify($song)
{
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: User forum mailing list archive at Nabble.com.
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.
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
//something
then
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 abhinay_agar...@infosys.com wrote:
hey all,
i have a scenario like this..
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.
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 rule3
Read the Guvnor user guide?
On 12 July 2012 07:52, arup arup4u2...@gmail.com 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
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 abhinay_agar...@infosys.com wrote:
rule rule1
agenda-group 1
salience 0
when
$a : Account()
$h :
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.
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
rule rule3
On 12/07/2012, abhinay_agarwal abhinay_agar...@infosys.com 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:
What rules are in agenda-group 3?
On 12 July 2012 09:58, abhinay_agarwal abhinay_agar...@infosys.com wrote:
rule rule1
agenda-group 1
salience 0
when
$a : Account()
$h : HashMap(!(this[Aggregate_Balance]=5))
then
setFocus(2)
end
rule
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(Abhinay)
end
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
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-loop,
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 abhinay_agar...@infosys.com wrote:
what is unclear in my mind is, if we can use something like this :
when
$c:
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
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);
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
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:
Dear All,
I discovered why the rules stopped working after ChangeScanner starts the
problem is the issue
JBRULES-2947https://issues.jboss.org/browse/JBRULES-2947?page=com.atlassian.jirafisheyeplugin:fisheye-issuepanel
.
To fix the problem I changed my models to a POJO package instead of the
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
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
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();
}
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(
, 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
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:
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
RuleTable X
Condition Action
x.a == $1 x.b = $param
1 2
RuleTable Y
ConditionAction
x.b == $param
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.
32 matches
Mail list logo