You can't set Drools to read N events per second.
Performance depends on several factors, so asking for how many events
doesn't make sense. Benchmark.
Who should admit a delay?
-W
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-performance-tp4027355p4027367.html
virajn wrote
I'm using this project as a experiment. Therefore condition of the all
rules are same and they will fire once for all the objects. Following is a
sample.
when
UserProfile( profile == UserProfile.STUDENT )
$book : Book( student == true )
then
Add this after your last insertion:
clock.advanceTime(1, TimeUnit.MILLISECONDS);
I'm not sure why you have to do this, though. Perhaps it is a bug in Drools.
--
View this message in context:
http://drools.46999.n3.nabble.com/Event-Processing-in-Drools-tp4025029p4025161.html
Sent from
file.separator
Daniel Straub wrote
Spending some time for debugging, we realized that in KieBuilderImpl (and
other places) file names are compared with linux path delimiter
We made the followin hack
Hack, indeed. RESOURCES_ROOT should be set correctly, using
System.getProperty(
Probably something like the one below...?
A java.lang.NullPointerException was caused for unknown reason by
undisclosed code, guess what.
--
View this message in context:
http://drools.46999.n3.nabble.com/NPE-in-org-drools-compiler-compiler-PackageBuilder-tp4024516p4024521.html
Sent from
You have (at least) two different fact classes: Alert and Information (not
just one, as you write).
The rule you have shown has only two patterns - I was asking for one with
three patterns (as I was thinking they had all to be of the same class).
If you retract an Alert as soon as it is
This code may work, and then it may not: it depends on (Java) code not shown.
If it works, it will loop.
--
View this message in context:
http://drools.46999.n3.nabble.com/Abstracting-Rules-using-extends-tp4023217p4023226.html
Sent from the Drools: User forum mailing list archive at
Using a drl-defined class for defining the constants is all right, but these
values have to be used while creating a Vehicle object. People maintaining
the rules may not be the ones responsible for the code creating the facts,
and that's where these values will have to be used for setting the
So I'm not going to repeat the Expert User Guide here - read for yourself.
Some pointers:
* rule attribute agenda-group
* API call class AgendaGroup method setFocus()
* rule attribute auto-focus
Being in one file or other doesn't matter with these, although there's an
undocumented feature: Using
To figure out a hierarchical structure among rules isn't a very clear
definition...
Rules (like many other logical entities in some programming environment) are
written in compilation units - DRL file, which imposes one hierarchical
structure. Then, they are subordinate to packages (much like
can you let me know what would be the fix.
No, but it's possible if you consider showing the DRL file and Java code to
reproduce the error, indicating the Drools version, and with the exact error
message you are getting.
--
View this message in context:
If there is just one object of class XMLTool and all addNode() calls should
refer to this single object, you should do what Vincent suggested by making
this single object accessible via a DRL global variable, or by using the
singleton design pattern (as in Java).
Adding this object as a fact and
Read the definition of lock-on-active: it inhibits the firing of your second
rule.
It is almost certainly a bad idea to use Map objects like this. Beans are
much better suited, as you could write rules such as
when
MyType( year == 2012, state == null )
then
modify(...)
-W
--
View this
Using forall isn't so complicated. You can use the simplified form, where
the
condition to be satisfied is written in the pattern selecting the domain.
rule setPriority
when
$order: OrderType( priority != high )
forall ( OrderLineType( quantity 2 ) from $order.lineItem )
then
As an alternative to the CE forall, consider
rule setPriority
when
$order: OrderType( priority != high )
not OrderLineType( quantity = 2 ) from $order.lineItem
then
modify( $order ){ setPriority( high ) }
end
--
View this message in context:
Inverting the order of patterns (and following Lisa's idea) makes the problem
go away:
rule asdf
when
OtherType( $member : member )
Interface( this == $member )
then
// do whatever with $member
end
This can be constrained to a subset of subclasses if there is also
ConcreteType3
16 matches
Mail list logo