Need help with setFocus
by new2drools
Hi All,
Need some help with understanding setFocus.
I have the following use case:
if (condition1) {
if (condition2) {
} else if (condition3) {
} else if (condition 4) {
}
}
if (condition5) {
if (condition2) {
} else if (condition3) {
} else if (condition 4) {
}
}
I created 3 rules (rule2, rule3, rule4) for checking condition2, condition3,
condition4 and
created 1 agenda group (groupX) for them.
I created 2 rules (rule1, rule5) for checking condition1, condition5 and
created 1 agenda group(groupY) for them.
rule "rule1"
agenda-group "groupY"
when
//
then
drools.setFocus("groupX");
end
rule "rule3"
agenda-group "groupX"
activation-group "someActiveGroup"
when
//
then
//
end
>From the java code:
ksession.getAgenda().getAgendaGroup("groupY").setFocus();
Problem: The first time, drools.setFocus("groupX") is invoked, I see that
it's working fine. rule2 or rule3 or rule4 get triggered. But, the SECOND
time that drools.setFocus("groupX") is invoked, I don't see that any rule in
agenda-group groupX is being invoked...even though one of the rule's LHS
explicitly matches...thinking that the activation-group is cancelling all
the activation's (after one rule in that activation group is fired), I even
removed the activation-group statement. But, it didn't help...ideally, I
would like to bunch rule2, rule3, rule4 in one activation group.
Can you please let me know as to why the second invocation of setFocus is
not working? I even tried to remove everything in LHS of rule2/3/4, to see
if the second invocation would work...it doesn't...
Thanks!!
--
View this message in context: http://www.nabble.com/Need-help-with-setFocus-tp24177742p24177742.html
Sent from the drools - user mailing list archive at Nabble.com.
2 weeks, 1 day
Drools beginner - unable to resolve method using strict-mode
by Stefan Schuster
Hi,
I'm new to drools, and I made my first steps using the very nice
video-tutorial "Build Pong in 13 minutes using JBoss Drools" found here:
http://www.youtube.com/watch?v=Omj4PR3v-nI
Eclipse shows building errors, but Pong start anyway. What does this error
mean?
in move.drl there is following rule:
*<rule "Move Bat Up" timer(expr: bat.speed, bat.speed) no-loop when*
* ui : PongUI( ready == true )*
* ( KeyPressed( keyText == "A" ) and bat : Bat( playerId ==
PlayerId.PlayerOne, y > pconf.padding + pconf.sideLineWidth )*
* or*
* KeyPressed( keyText == "K" ) and bat : Bat( playerId ==
PlayerId.PlayerTwo, y > pconf.padding + pconf.sideLineWidth ) ) *
* td : TableDirty( ) *
*then *
* tableG = ui.getTablePanel().getTableG();*
* tableG.setColor( Color.BLACK ); // background*
* tableG.fillRect( bat.x, bat.y, bat.width, bat.height );*
* *
* modify( bat ) { y = bat.y - 2 };*
* tableG.setColor( Color.WHITE ); // background*
* tableG.fillRect( bat.x, bat.y, bat.width, bat.height ); *
* modify( td ) { dirty = true };*
*end*
the error message is:
[Error: unable to resolve method using strict-mode:
org.drools.spi.KnowledgeHelper.td<http://org.drools.spi.knowledgehelper.td/>
()]
[Near : {... @Modify with( td ) { dirty = true }; ....}]
in another File (ui.drl) TableDirty is defined:
*declare TableDirty*
* @propertyReactive*
* dirty : boolean*
*end*
Any ideas what this error message means? And why can I start pong despite
this error?
Thanks a lot for helping me
Stefan
4 months, 1 week
conways game of life
by Mark Proctor
For anyone looking for a good and complex example on how to write rules
properly, please look at Conways Game of Life in drools-examples, for
extra bonus points compare it to the old version in M1. You'll see
nearly all the logic is moved from java to the drl and we have removed
the need for nested objects by using objects relaitionally, which also
allows us to exploit cross products to drive the application.
Mark
4 months, 1 week
Drools Timers
by Demian Calcaprina
Hey Guys, I am trying to use to use the timer in the rule, but I don't
fully understand it.
I have a simple rule which says
rule "Test"
timer(int: 1s)
when
Something()
then
System.out.println("Something Happens");
end
And I insert 100 Someting() object, after 1 second I see 100 activations.
- Can I do with the timer something like "run this rule once per minute"
for example?
- When does the timer start to run?
Thanks in advance,
Demian
11 years, 4 months
Rules / Machine Learning / Bayesian network
by Jonathan MERCIER
Dear,
I come here to collect some information on these subjects.
I found that in 2008 a student of Mark Proktor (Gizil Oguz ) worked on a
machine learning using drools.
And currently Mark work on a Bayesian approach.
These subjects are really exciting.
Bayesian Belief Network needs to be able to put a probability value on
each event and for this using machine learning is a way to do.
So I would like to know how if they are somewhere a little example which
put all of these good projects in one?
After Gizil Oguz finished his work, we never heard about drools and
machine learning. I would like to know if that is normal ?
Or maybe using weka and drools is better ?
Thanks you everybody, any information on these subject could to be
interesting :-)
Have fun
Jonathan
11 years, 4 months
Best SAP HANA Online Training in INDIA | USA | UK | CANADA
by seshirekha
SAP Centre provides the Best of the Best SAP HANA Online Training
<http://www.sapboonline.com/sap-hana-online-training/> to the students who
are passion and dedicated to learn the SAP HANA Course. The Students can
choose their comfortable timings from anywhere of the world to learn SAP
HANA through online with real-time methodologies. We will provide the
complete technical support to our students for resume preparation and to
attend interviews after completion of SAP HANA Training.
*Some of the SAP HANA Course topics that covered by our professionals:*
*Introduction to SAP:*
1.Introduction to SAP HANA.
2.SAP In-Memory Strategy.
3.HANA compare to BWA.
*Look & Feel:*
1.In-Memory Computing Studio.
2.Administration view.
3.Navigator View.
4.System Monitor.
5.Information Modeler.
*And many sub topics are there for more details please go through the
website.*
Please call us for the Demo Classes we have regular batches and weekend
batches.
*Contact Number: INDIA:* +91-8686984442,
*Email:* saponlinecentre(a)gmail.com,
*Web:* http://www.sapboonline.com/sap-hana-online-training/
--
View this message in context: http://drools.46999.n3.nabble.com/Best-SAP-HANA-Online-Training-in-INDIA-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
CORE JAVA Online Training and Certification Training in USA | UK | India | New York | Singapore
by seshirekha
SAP Centre offers the Best CORE JAVA Online Training
<http://www.sapboonline.com/core-java-online-training/> which is
informative and helpful training for fresher’s who have just graduated their
IT degree and also for Employees. We will provide Quality study material,
E-books for Core Java which will useful to our students during and after
completion of Core Java Training. So, at the end of the Core Java training
you will be well equipped with the knowledge and skills to handle any task
at your work.
*Some of the Core Java Course topics that covered by our professionals:*
*Introduction to CORE JAVA (J2SE):*
1.Primary Goals of Java Technology.
2.Simple Java Program.
3.Object Oriented Programming.
*Objectives:*
1.Declaring Java Technology Classes.
2.Declaring Methods, Attributes.
3.Encapsulation, Information Hiding.
4.Constructors.
5.Packages.
*And many sub topics are there for more details please go through the
website.*
Please call us for the Demo Classes we have regular batches and weekend
batches.
*Contact Number: INDIA:* +91-8686984442,
*Email:* saponlinecentre(a)gmail.com,
*Web:* http://www.sapboonline.com/core-java-online-training/
--
View this message in context: http://drools.46999.n3.nabble.com/CORE-JAVA-Online-Training-and-Certifica...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
Embedding Guvnor 6 Guided Editor
by rjr201
Hi,
I'm looking to upgrade to the new kie workbench 6.. i really need to be able
to embed the guided editor within my application. I've done this previously
using the iframe approach. I can't seem to find any documentation on how to
do this in the latest release. Sorry if i've overlooked any documentation on
this. Any advice would be greatly appreciated..
Cheers.
Rich.
--
View this message in context: http://drools.46999.n3.nabble.com/Embedding-Guvnor-6-Guided-Editor-tp4028...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months