Sliding window of length (1) equals latest event?!
by OlliSee
Hey again everyone,
I seem to be having another problem.
When I have a rule like that
when
A() over window:length(1)
B() over window:length(1)
then
...
I imagine now having two windows of length 1. One always keeping the latest
A event and one always keeping the latest B event. And I expect them to
update themselves once a new event comes in.
But if I have events coming in like this...
A1, A2, B1
The rule fires for (A2, B1)
then another event B2 is coming in and it fires for (A2,B2)
So far so good.
Then another event A3 is coming in and the rule fires for (A3,B2) and
(A3,B1).
Why? Shouldn't the B window only have B2 inside since it arrived and thus
fire only for (A3,B2)?
I have already been searching for this problem, found this
http://drools-java-rules-engine.46999.n3.nabble.com/DROOLS-problem-with-s...
but I'm not sure if this is the same problem as mine.
Helping me understand this is highly appreciated, since I thought I had
completely understood the window behaviour.
Thanks in advance.
Kind regards
Oliver
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Sliding-window-of-len...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 1 month
Looking for training/guides/books about drools C.E.P scalability
by radai.rosenblatt
Hi.
The company I work for is evaluating drools for use in an event analysis
engine, to be based on drools fusion, and I was tasked with evaluating
Drools for that purpose. I've read a couple of books that deal with drools,
in addition to various articles, guides, and tutorials, but could not find
any guides to drools scalability. the references i could find usually deal
with trying to partition a problem into "orthogonal" sessions running on
different nodes, but i could not find any treatment of CPU requirements,
memory consumption estimates, or single-session scalability concerns, and
when I tried a couple of experiments on my own the results were quite
alarming (see https://issues.jboss.org/browse/JBRULES-2845 - possibly a
threading bug?, and https://issues.jboss.org/browse/JBRULES-2862 - a memory
leak).
Im looking for any training course / book / guide dealing with fusion
scalability. the aim, eventually, is to reach a throughput of 10M
events/day, most probably feeding into a single session. any course / book /
training recommendation would be very welcome.
Radai.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Looking-for-training-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 1 month
Problem implementing multiple evals
by Ayush
When I'm trying to execute multiple evals I'm getting errors. Below is what
I'm trying to do
MyEvent(prop1="XYZ") over window:time(1m) from entry-point
MyStream
or
(MyEvent() over window:time(1m) from entry-point MyStream
and
Number($i1 : doubleValue)
from accumulate(
MyEvent(
prop1 == "CONNECT",
prop2 == 3,
eval((prop3 matches ("match "+getFirstNameRegex()+"
Connect")) == true)
) over window:time(1m) from entry-point MyStream,
count()
)
and
eval($i1 > getNodeCount()*0.35))
or
(MyEvent() over window:time(1m) from entry-point MyStream
and
Number($i2 : doubleValue)
from accumulate(
MyEvent(
prop1 matches "(second|Third{1}_CONNECT",
prop2 == 1,
eval((prop3 matches
("MatchOne|MatchTwo){1}::"+getMMSCNameRegex()+", failure")) == true)
) over window:time(1m) from entry-point MyStream,
count()
)
and
eval($i2 > getConnectionCount()*0.4))
or
(MyEvent() over window:time(1m) from entry-point MyStream
and
Number($i3 : doubleValue)
from accumulate(
MyEvent(
prop1 matches "(E1|E2){1}_CONNECT",
prop2 == 3,
eval((prop3 matches ("REPT (one|five|seven){1}::
"+getServerID()+" is down")) == true)
) over window:time(1m) from entry-point MyStream,
count()
)
and
eval($i3 > getThirdNodeCount()*0.5))
When I'm trying to execute the above LHS I get
org.drools.rule.InvalidPatternException: Required Declarations not bound:
'$i1'.
I even tried using below approach
AlertReceivedEvent() over window:time(1m) from entry-point
NotificationStream
$I1 : Double() from getIsgNodeCount()
Number(doubleValue > $I1) from accumulate(
AlertReceivedEvent(
entity == "NPMMS_NE_CONNECT",
probableCause == 3,
eval((specificProblems matches ("REPT ISG
NPMMS::Unable to connect to "+getPxmmsNameRegex()+" node: PXMMS")) == true)
) over window:time(1m) from entry-point
NotificationStream, count()
)
But when I'm placing parentheses () around it, it throws exception stating
mismatched input '$I1' expecting ')' in rule. For now I'd placed these 3
statements in separate rules. Can anyone please help me solving it? Thanks
in advance.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-implementing-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 1 month
Loading enums programmatically in guvnor
by drools10
Hi,
I am a newbie to drools/guvnor. I am trying to populate a drop-down list
in guvnor rule generation with preconfigured values(which would come from
database).
I tried to populate the titles property of AgeTest class with values from
loadData() method of AgeValues class.
In the new Enumeration I gave: titles=(new
com.guvnor.AgeValues()).loadData();
My classes are as below:
public class AgeTest {
private List<String> titles = new ArrayList<String>();
public List<String> getTitles() {
return titles;
}
public void setTitles(List<String> titles) {
this.titles = titles;
}
}
and
public class AgeValues {
public Map<String,List<String>> loadData() {
Map<String,List<String>> data = new HashMap<String,List<String>>();
List<String> titleValues = new ArrayList<String>();
titleValues.add("title1");
titleValues.add("title2");
data.put("AgeTest.titles", titleValues);
return data;
}
}
I get the following error while validating the enumeration: "The expression
is not a map, it is a java.util.ArrayList".
Can anyone please guide me in this regard. I even tried to have titles field
as a map, but same issue.
I copied the 2 classes to my guvnor/web-inf folder.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Loading-enums-program...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 1 month
Sliding length window of (1) equals latest event?!
by OlliSee
Hey again everyone,
I seem to be having another problem.
When I have a rule like that
when
A() over window:length(1)
B() over window:length(1)
then
...
I imagine now having two windows of length 1. One always keeping the latest
A event and one always keeping the latest B event. And I expect them to
update themselves once a new event comes in.
But if I have events coming in like this...
A1, A2, B1
The rule fires for (A2, B1)
then another event B2 is coming in and it fires for (A2,B2)
So far so good.
Then another event A3 is coming in and the rule fires for (A3,B2) and
(A3,B1).
Why? Shouldn't the B window only have B2 inside since it arrived and thus
fire only for (A3,B2)?
I have already been searching for this problem, found this
http://drools-java-rules-engine.46999.n3.nabble.com/DROOLS-problem-with-s...
but I'm not sure if this is the same problem as mine.
Helping me understand this is highly appreciated, since I thought I had
completely understood the window behaviour.
Thanks in advance.
Kind regards
Oliver
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Sliding-length-window...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 1 month