possible bug with event declarations
by Michal Bali
Hi,
Should it be possible to declare an event role to an existing type that is
outside of the current rule package?
Example:
In the following file:
http://fisheye.jboss.org/browse/JBossRules/trunk/drools-compiler/src/test...
change the first line to:
package org.droolsssssss; //this makes sure that StockTick is in different
package
now, the test org.drools.integrationtests.StreamsTest.testEventAssertion()
throws following exception:
org.drools.RuntimeDroolsException: unable to resolve Type Declaration class
'StockTick'
at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:484)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:381)
at
org.drools.integrationtests.StreamsTest.loadRuleBase(StreamsTest.java:93)
at
org.drools.integrationtests.StreamsTest.testEventAssertion(StreamsTest.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Best Regards,
Michal
16 years
Parallell rules execution?
by Magnus Heino
I remember reading something somewhere a while ago about Drools 5 and
parallel rules execution...?
Is there any info available on this? Is it available in 5M2? When will it be
available? What are the features? Are the any docs now? etc...
Thanks!
/Magnus Heino
16 years
not exists / forall(not) logically equivalent, behave differently
by tim tim
hello there,
i have a rule, that should fire, when a required part of a whole is missing.
lets say the whole is a dog, and the required part the tail.
then the rule should fire, when there is a dog without a tail.
i stated the rule in two logically equivalent ways.
1) when we have a dog, and all existing tails belong to other peoples dogs,
the rule should fire:
rule "no dog without a tail; forall"
when
$dog :Dog()
forall($t : Tail()
Tail(dog != $dog))
then
// fire rule
end
2) when we have a dog and no tail exists that belongs to this dog the rule
should fire:
rule "no dog without a tail; not exists"
when
$dog :Dog()
not( exists( Tail(dog == $dog)))
then
// fire rule
end
and they really do behave similar, but not the same..
workingMemory.insert(dog);
workingMemory.insert(dog.getTail());
workingMemory.fireAllRules();
// here both did not fire, but when i go on:
workingMemory.modifyRetract(dogHandle)
workingMemory.modifyInsert(dogHandle, dog)
workingMemory.fireAllRules();
// now the not(exists(..)) version did fire, whereas the forall(..) version
did not.
of course both rules should not have fired, nothing changed for the dogs
relationship
with its tail.
i am using the 5.0.0.snapshot version of drools but i can not imagine that
this is an
unknown bug, as this is rather basic predicate logic.
what am i missing?
best, tim
16 years
modify/update Object query
by Sangrish
Hi
I have a number of rules(in an agenda) which make many little changes
to the same object(s). Every time I update an object
the rules get activated again. Is there a way that I make the small changes
to the objects as the rules are executed but update/modify them with respect
to (w.r.t.) WorkingMemory only in the last rule to fire (decided by
salience).
You can visualize it as some kind of "Refresh" operation on an object w.r.t.
WorkingMemory
Thanks
Siddharth
--
View this message in context: http://www.nabble.com/modify-update-Object-query-tp19843075p19843075.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years
BRMS rule info logging
by techluver
I'm new to drools world. Kindly clarify following things
My requirement is to log each data in the DB(that meets any of the business
rule) along with rule info.
if I use BRMS ( i think it maintains the rules separately in its own db
table)
How I can associate each log with the rule info?
Approach 1. Can I access BRMS's rules directly and associate it in my
logging?
Approach 2. I can't do Approach 1, then I'm thinking to have RULES table in
my app db.Then whenever any rule is added using BRMS, Then add an entry into
RULES table and use this table for my logging
Please advise me on the right approach.
Thanks in advance.
--
View this message in context: http://www.nabble.com/BRMS-rule-info-logging-tp19766982p19766982.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years
Upload Rules to BRMS at runtime
by Asif Akram
Hi,
I was wondering if it is possible to create and upload rules at
runtime to BRMS to be accessed by other users. I have only seen the
examples where existing packages/rules are loaded from the BRMS. Any
help and suggestion will be appreciated.
Cheers
Asif
--
This message has been scanned for viruses and
dangerous content by WATEEN TELECOM, and is
believed to be clean.
16 years
Compatibility of Rule Flows from 4.0.7 to 5.0.0
by Vikrant Yagnick
Hi All,
I wanted to know if RuleFlows made using the Eclipse 4.0.7 RuleFlow Builder will work with 5.0.0. When, I try to upload a 4.0.7 ruleflow into Guvnor, I get a NullPointerException and before that the following:
Cannot find the declaration of element 'org.drools.ruleflow.core.impl.RuleFlowProcessImpl'.
I checked the 5.0.0M1 jars for drools-core, and this class seems to have been removed from there. Also, after installing the 5.0.0 plug-in into Eclipse, my rule-flow nodes have all gone.
Also, this may be a minor bug but it says(both in the docs and the BRMS Guvnor M1 Release):
"Ruleflows allow flow control between rules. The eclipse plugin provides a graphical editor. Upload ruleflow .rf files for inclusion in this package.":
Should the .rf say .rfm ?
Cheers,
Vikrant
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 years
Deploying Guvnor M2 in Glassfish
by Richard Ambridge
On wednesday I logged a bug GUVNOR-19 indicating that I am unable to
deploy Guvnor M2 in Glassfish application server.
Since then, and with little sleep, I have been able to workaround the
problem.
To deploy Guvnor M2 release in glassfish, do the following.
Download jboss-seam from
http://heanet.dl.sourceforge.net/sourceforge/jboss/jboss-seam-2.1.0.CR1.t...
untar it,
Download drools-guvnor.war
mkdir tmp
cd tmp
jar -xf ../drools-guvnor.war
cd WEB-INF/lib
rm org.jboss.seam-jboss-seam-2.1.0.BETA1.jar
cp from jboss-seam/lib directory into WEB-INF/lib
jboss-seam.jar
hibernate-validator.jar
jar up the drools again
jar -cf ../drools-guvnor.war *
So, in summary, you need to replace the
org.jboss.seam-jboss-seam-2.1.0.BETA1.jar in guvnor lib directory with
the jboss-seam.jar file from jboss-seam
and add the hibernate-validator.jar file
Hope that helps some people :)
Ric
16 years