taskService restart problem (urgent response needed)
by KiranP
i m having 2-3 tasks in my flow the flow works fine in the normal conditions
the tasks are handled by the MinaTaskServer and MinaTaskClient but the
problem is that it uses the command and the call back mechanism using the
map of tasks request (if i m not wrong) hence when the taskservice restarts
all the callback refrence is lost and completing any task wont updated to
the MinaTaskServer (even if the task is available)
can any one hint me who i can achieve trans-restart task completion.....
till today none of my posts got a reply..............i think u r all
busy............if some one gets time plz help....
bcoz now it has become a grave matter.........it urgent...
thanks
-----
Keep Working >>:working:
KiranP
--
View this message in context: http://n3.nabble.com/taskService-restart-problem-urgent-response-needed-t...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Declaring events separately from rules breaks expires
by Samuli Saarinen
Hello,
I have the following situation with Drools 5.1.1: 2 drl files where one
contains an event declaration:
declare Event1
@role(event)
@expires(1s)
end
and other has a simple rule:
rule "Evt1"
when
e: Event1(value == 10)
then
System.out.println(e);
end
And I have the following test which fails:
ses.insert(new Event1(1));
ses.fireAllRules();
clock.advanceTime(2, TimeUnit.SECONDS);
ses.fireAllRules();
assertEquals(ses.getFactCount(), 0L);
The same test passes if the rule and event declaration are on the same
drl file.
Further more if I declare the event in both of the files with different
@expires the one being used is the one that is added first. I was hoping
that the first declaration to be a "default expires" that could be
overwritten later on with a new declaration but it seems that this is
currently not possible.
Cheers,
Samuli
--
Remion Oy Etävalvontajärjestelmät liiketoiminnan
Samuli Saarinen tehostamiseen
gsm +358 (0)50 3560075
fax +358 (0)3 2125064 www.remion.com
13 years, 9 months
Instructions for upgrading designer.war?
by Han Ming Low
Hi,
I understand that the designer.war is a project by intalio.
When looking at the source for the war at
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/desi...,
I saw the changes to be made to make it compatible with Drools.
I think I can do some of the steps like
1) changing the web.xml to use tomcat instead of jetty
2) added slf4j library
3) move lib/bpmn2 library to web-inf/lib
4) changes to oryx.js that involve
- commenting out the header
- commenting out the log
- change the repository url from "/designer/uuidRepository?uuid="+ uuid to
"/drools-guvnor/org.drools.guvnor.Guvnor/guvnorAPI?action=load&uuid="+ uuid
However, I'm not sure what is the BPMN2 import/export classes to replace in
WEB-INF/classes
Can someone could tell me which are the classes?
I can also help to update the designer. :)
Thanks.
Han Ming
13 years, 9 months
timer and duration
by OlliSee
Hello there.
I seem to have trouble with the "timer" operator which is documented to have
superseded the "duration" operator for use in the rule body. I might have
something to do with the "not" operator I use in my rule.
Scenario: A is a fact, B is an event
When I write something like this
rule "test"
timer(int: 5s 5s)
when
$a : A()
not (exists B(a == $a))
then
insert(new B($a)); // which means in the new B object: B.a
= $a
end
I expect this rule to fire every 5 seconds if and only if the LHS is true.
I just insert a few A objects at the beginning.
So I expect this rule to fire ONCE, because it will insert the B event which
makes this rule's LHS evaluate to false in the future.
BUT, reality is, this rule fires every 5 seconds, no matter what.
Using the deprecated duration operator with "duration(5s)" instead of the
timer operator, it works as expected.
I assume, that timer works differently compared to duration. So I conclude
that duration should coexist. Or am I missing something here on the usage of
the timer operator?
Thanks in advance.
Oliver
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/timer-and-duration-tp...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
How do I prevent the package registry from being null in my package builder?
by retoy
I just installed Drools and wanted to build a simple RuleFlow.
But When I add any process containing constraints or rules to my
Knowledgebuilder, I'm always getting a NullPointerException, because the
"package registry" seems to be null.
.....
java.lang.NullPointerException
at org.drools.compiler.ProcessBuilder.buildProcess(ProcessBuilder.java:119)
at
org.drools.compiler.ProcessBuilder.addProcessFromFile(ProcessBuilder.java:223)
at
org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:447)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:503)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
.....
ProcessBuilder.java:118 PackageRegistry pkgRegistry =
this.packageBuilder.getPackageRegistry(process.getPackageName());
ProcessBuilder.java:119 org.drools.rule.Package p =
pkgRegistry.getPackage();
.....
The ruleflow is successfully validated though when i press that button in
eclipse... Can somebody give me a hint what's missing?
Thanks!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-do-I-prevent-the-...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 10 months
Trying to get Eclipse Java code to call Guvnor
by John Peterson
I'm using the example code from the Red Hat Magazine -
http://magazine.redhat.com/2008/08/12/jboss-drools-how-to-tuning-guvnor-
part-1/ - to try to get the sample code to work, but I keep getting the
following error:
Exception in thread "main" java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Unknown Source)
at java.util.Properties.load0(Unknown Source)
at java.util.Properties.load(Unknown Source)
at
org.drools.agent.RuleAgent.loadFromProperties(RuleAgent.java:299)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
at test.GuvnorTest.main(GuvnorTest.java:15)
It appears to be unable to find my 'Guvnor.properties' file, but I have
it in the classpath (I actually have it in several different places on
my C: drive as I tried to figure out why it couldn't find it). Does
anyone have any thoughts on what's wrong here?
I'd appreciate any guidance. It seems like this should be a simple
answer but I haven't been able to figure it out.
13 years, 10 months
About for and inheritance
by Chris Woodrow
Hi,
I recently find out a few issues using for, and I wanted to share it with
you. I made a simple exemple to illustrate my purpose.
My classes are (I did not represent accessors & constructors):
public class Cheese {
protected String name;
}
public class FrenchCheese extends Cheese{
private String smell;
}
public class Person {
private Cheese likes;
}
Here is my rule set :
package rules
rule "likes cheese"
when
$person : Person ()
Cheese( ) from $person.getLikes()
then
System.out.println("likes cheese");
end
rule "likes french cheese"
when
$person : Person ()
FrenchCheese( ) from $person.getLikes()
then
System.out.println("likes french cheese");
end
First test :
Cheese cheese = new FrenchCheese("good", "camembert");
Person person = new Person();
person.setLikes(cheese);
Output :
likes french cheese
likes cheese
Wich is expected...
Second test :
Cheese cheese = new Cheese();
Person person = new Person();
person.setLikes(cheese);
Output :
likes french cheese
likes cheese
That's the first strange thing. As far as I am concerned, rule "likes french
cheese" should not match (since a Cheese is not a FrenchCheese).
I made a change to the second rule :
rule "likes french cheese"
when
$person : Person ()
FrenchCheese( smell == "good" ) from $person.getLikes()
then
System.out.println("likes french cheese");
end
Third test :
Cheese cheese = new Cheese();
Person person = new Person();
person.setLikes(cheese);
output :
It throwed an exception : Exception in thread "main"
java.lang.ClassCastException: rules.Cheese
I am not saying the ClassCastException is not to expect in such a case but I
think I would simply expect it not to match (as far as a Cheese is not a
FrenchCheese).
Chris
13 years, 10 months