Order of Execution on Messages
by gboro54
We are currently authoring rules using Drools 5.3 and using jBPM 5.2 for
orchestration. The situation we have is as follows: Certain groups of rules
can execute on n number of messages in any order(i.e the order in which the
consequences occur does not matter). The problem comes in later in the
process when those same n messages need to have their consequences happen in
a certain order. Is there a good way to handle this? We have thought about
appending messages to a queue and just operating on one message at a time
however this seems slow. In addition when utilizing jBPM and drools what is
the best way to batch data in and out of the session. I understand starting
a new session is cheap but was hoping there may be a way to have jBPM insert
n records at a time and just continue to read from the db until no more
records are returned.
TIA!
--
View this message in context: http://drools.46999.n3.nabble.com/Order-of-Execution-on-Messages-tp378401...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
Drools facts using POJO accessor methods error
by aliosha79
Hi,
i have some troubles to undestand how drools processes FACTS. I have a POJO
class resulted from an UnMarshal jaxb processing like this:
public MyClass {
protected String className = "Class1";
public getClassName(){
return className;
}
public setClassName(String className){
this.className = className
}
}
Now i have to compose a drl file with a rule like this:
when
$Class : MyClass()
eval ($Class.getClassName() == "Class1")
then
System.out.println("ok!!!");
end
This syntax doesn't rise errors BUT doesn't match the real name... no ok
message are printed.
when
$Class : MyClass (getClassName() == "Class1")
then
System.out.println("ok!!!");
end
This syntax raises me a null pointer exception!!!
What's the right syntax?
Can i use the accessor methods building drools facts?
Thanks a lot!
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-facts-using-POJO-accessor-method...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
jboss tohu
by Olfa h
hi,
can someone help me to deploy jboss tohi 1.2.0 into jboss 4.3.2 and eclipse
indigo ?????????????????
thx
13 years, 10 months
A problem in sliding windows.
by Hassan
when I was testing the sliding windows, I was blocked becouse this concept
doesn't work for me, It's becouse of my misunderstanding of the concept, I
looking for the error which I do:
for exemple:
==> the rule:
*/
rule "sliding windows"
when
$a : Event1() over window:time(2s)
then
System.out.println("ok");
end /*
==> Events
Event1 ev1=new Event1((long)1000,(long)2000); // the event will occur in 1s
and finish in 3s
Event1 ev2=new Event1((long)3000,(long)4000); // the event will occur in 3s
and finish in 4s
session.insert(ev1);
session.insert(ev2);
clock.advanceTime(4, TimeUnit.SECONDS); // we are now in 4s so only event
that happen in [2s,4s] have
session.fireAllRules(); // to fire -ev2-.
// But the probleme that, it gives me 2 ok so the 2 object are fired !! I
don't inderstand why ??
--
View this message in context: http://drools.46999.n3.nabble.com/A-problem-in-sliding-windows-tp3781402p...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
CLOUD mode Vs Stream Mode.
by Hassan
Hello,
It's clair that to work with thae events we have to put our base
configuration into STREAM mode like this:
*/KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
config.setOption( EventProcessingOption.STREAM );/*
But in my code bellow I didn't use this mode and I didn't use Entry-points,
Although my events work very well !!
Help please !!
--
View this message in context: http://drools.46999.n3.nabble.com/CLOUD-mode-Vs-Stream-Mode-tp3780295p378...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
POJO accessors method in Drools facts
by aliosha79
Hi,
i have some troubles to undestand how drools processes FACTS. I have a POJO
class resulted from an UnMarshal jaxb processing like this:
public MyClass {
protected String className = "Class1";
public getClassName(){
return className;
}
public setClassName(String className){
this.className = className
}
}
Now i have to compose a drl file with a rule like this:
when
$Class : MyClass()
eval ($Class.getClassName() == "Class1")
then
System.out.println("ok!!!");
end
This syntax doesn't rise errors BUT doesn't match the real name... no ok
message are printed.
when
$Class : MyClass (getClassName() == "Class1")
then
System.out.println("ok!!!");
end
This syntax raises me a null pointer exception!!!
What's the right syntax?
Can i use the accessor methods building drools facts?
Thanks a lot!
--
View this message in context: http://drools.46999.n3.nabble.com/POJO-accessors-method-in-Drools-facts-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
CLOUD mode Vs Stream Mode.
by Hassan
Hello,
It's clair that to work with thae events we have to put our base
configuration into STREAM mode like this:
*/KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
config.setOption( EventProcessingOption.STREAM );/*
But in an exemple, I didn't use this mode and I didn't use Entry-points,
Although my events work very well !!
Help please !!
--
View this message in context: http://drools.46999.n3.nabble.com/CLOUD-mode-Vs-Stream-Mode-tp3780297p378...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months