Re: [rules-users] Caching results in temperory variables
by Greg Barton
You must either update an existing working memory object or insert a new working memory object with the results. That's how rules communicate with each other.
GreG
On Aug 12, 2010, at 10:31 AM, Manav <manav7574(a)yahoo.com> wrote:
Hi,
I am using the version 5.x of drools and i have a scenario where i want to hold
the result of
a test in one rule to a temperory variable . This result will then be used in
another rule that will be fired
later in the sequence .
For ex :
salience 100
when
User (language.keySet contains "Japanese", $j_score : language["Japanese"])
then
// do something
end
salience 50
when
User (language.keySet contains "French", $f_score : language["French"])
then
// do something
end
salience 25
when
eval (($j_score + $f_score) > 4)
then
// update the same to db
end
Is this possible in Drools 5.x ?
Regards,
Manav
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 4 months
Where is MinaTaskClient ?
by Gustavo Tenrreiro
Hi,
I am trying to connect to the mina server using the MinaTaskClient
referred in the documentation; however the class does not seem to
exist.
I got the latest Drools 5.1 download.
In any case how can I connect to the server in order to retrieve the tasks ?
I see the TaskClient has the methods I need, but I am not sure how to
create one, and everything I ve tried fails to retrieve a working
TaskClient.
I appreciate your help.
Thanks
15 years, 4 months
A truly sibylline method
by Wolfgang Laun
Ancient Sibyls, such as the famous Pythia, frequently responded to
supplicants' questions in a dark and mysterious way. (Croesus, for instance,
was told that attacking the Persians would "destroy a great empire"; that
this could also mean his own did not occur to him.)
I was reminded of this by looking at the Javadoc for the
org.drools.time.SessionClock method getCurrentTime, which is documented to
return a long value, albeit explicitly stating that the semantics of this
value is not defined and that an implementation of this interface may do as
it pleases.
All that's needed to clear this oracular obfuscation is another method,
giving the number of nanoseconds per unit of the getCurrentTime return
value. Why ever has this not been added?
-W
15 years, 4 months
Temporal operator "after"
by Wolfgang Laun
According to the Fusion manual, "after" is used like this:
$eventA : Foo(...)
$eventB : Bar( this after[0ms,1h] $eventA )
provided Foo and Bar have @role(event).
This works.
But, given a class Wrapper( Foo foo ), the pattern combination
Wrapper( $eventA : foo )
$eventB : Bar( this after[0ms,1h] $eventA )
results in a class cast exception at runtime, telling me that a Foo cannot
be cast to a org.drools.common.EventFactHandle.
Working around this by doing
Wrapper( $foo: foo )
$eventA : Foo( this == $foo )
$eventB : Bar( this after[0ms,1h] $eventA )
solves the problem, but is this really necessary and intentional? (The
documentation doesn't even hint at such a restriction.)
-W
15 years, 4 months
generate an image of the instance the process
by Eugenio Abello
hi, I working with drools flow 5.1, and i want generate an image of the
instance the process, in the same way the gwt-console. I revice
org.drools.integration.console.graph.GraphViewerPluginImpl, but I can not
see how do..... there is some code of sample?
thanks
15 years, 4 months
fireUntilHalt() and OSGi - CPU load
by Georg Maier
Hi,
I am using Drools 5.1 (final) in an OSGi environment. When invoking
fireUntilHalt() for my StatefulKnowledgeSession, CPU load rises to 25%
(meaning one complete core on the quad-core machine). Needless to say, when
two sessions are used in different components at the same time I'm reaching
about 50%.
When creating an "ordinary" Drools project and using a
StatefulKnowledgeSession with fireUntilHalt() I do not experience this
problem.
Anyone experienced something similar or has some advice for me?
Any help would be highly appreciated :-)
Thanks in advance!
Cheers,
Georg
15 years, 4 months
[planner] curriculum course timetable modeling questions
by Joshua Daniel
Hi,
I am a newbie and am currently in the process of evaluating the drools
solver module for generating a timetable. I have couple of questions in this
regard...
1. I have two curriculums (Grade 1 - A, Grade 1 - B) and would like to
allocate a single room for all courses under a curriculum. How do I specify
this constraint?
2. Currently the rules are specified for a single week (i.e. period / time
slot list). How do I specify this for an entire year, does it mean I have to
create additional period / time slot lists for the entire year.
3. There are 5 days and 3 periods per day (i.e. 15 sessions per week) and we
have 6 common subjects and a separate course (German, French) specific to
the curriculum, assuming we equally distribute the load (i.e. if I want all
the courses to be atleast twice a week and just the separate courses
(German, French) to be thrice a week, what should be the lesson size.
Env: I have installed drools-5.0-solver and verifying the above attached XML
via the curriculumcourse sample data.
-jd
15 years, 4 months
Design of Rule Engine
by Manav
Hi,
I am using the 5.x version of Drools and currently new. I am currently
evaluating Drools for an internal
project .
The product's impressive and the support is absolutely superb.
To design a new Rule Engine using Drools as the base are there any
suggested design patters that i can take a look at ? If there are any best
practices that should be followed and gotchas to be avoided it would be
great if i could read about them.
For example if i am writing rules where two files contain a common set of rules,
is it possible to abstract out the common set of rules to a seperate DRL and
have that DRL referenced in other DRL's ?
These and other similar questions are what i am seeking answers to .
Regards,
Manav
15 years, 4 months
Firing Mulitple packages
by Vignesh
Hi,
We tried with a properties file with url of the set of package names in the
applicaiton and by iterating this file and fired the rules with out any
issues, but I want to know whether there is any way to fire all the rules in
multiple packages present in a Guvnor application using any built-in
methods?
Thanks in advance.
Regards,
Vignesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Firing-Mulitple-packa...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 4 months