Drools integration with JBOSS ESB
by Sathya Prakash
Hi ,
Did any one using Jboss esb for integrating drools? If yes then how to
handle exception suppose while executing my rules by calling custom class
an exception thrown at custom class should be sent to next actions.
--
Regards,
Sathya Prakash.
**
13 years, 9 months
JUnit Test failure when Eclipse library present on classpath
by StormeHawke
I'm not really sure what to make of this, but when the Drools Runtime library
is present on my project classpath, any of my junit tests that reference
Drools fail, but if I remove the runtime library from that same classpath,
everything runs as expected. The output in the console:
Build groovy files option has not been set one way or the other: use
'options.put(CompilerOptions.OPTIONG_BuildGroovyFiles,
CompilerOptions.ENABLED);'
(I'm not using groovy files of any kind)
But then I also get a really long stack trace in the JUnit output pane
(truncated once it reaches my code):
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Plugin
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at
org.eclipse.jdt.internal.compiler.Compiler.initializeParser(Compiler.java:737)
at org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:294)
at org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:159)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:349)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:51)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:389)
at
org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:56)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:74)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:677)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:640)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:266)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:458)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at
net.intellidata.pricing.PricingEngine.cacheKnowledgeBase(PricingEngine.java:136)
To top it off, the same test runs fine on my boss's computer, but not on
mine. Neither of us is sure why. What am I missing?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/JUnit-Test-failure-wh...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
getting details of facts triggering rules
by Archie Russell
Hi,
I've tried to figure this out but haven't been able to.
How can I, from the RHS, figure out the details of what triggered a rule.
I can access the facts individually by name, but how do I do it in a
generic fashion that would work in the RHS of any rule?
I am using decisiontables and want to be able to have a function that is
something like printTriggeringDetails()
I came across drools.getTuple but am not sure if that's the correct path
to go on. From there I get InternalFactHandles but don't know how to turn
those into human-readable facts.
Thanks for any help,
Archie
13 years, 9 months
dynamic class loading in drools 5.1
by saurabh maheshwari
hi ,
I am using drools 5.1 and i am creating one dynamic class .
Now How drools will aware of this dynamic class. It gives exception
that class not found .
So how i can say drools classloader that new class exist
Thanks & Regards
Saurabh
13 years, 9 months
Rules dont execute when republishing EAR on JBoss
by Ran Mochary
Hi,
I use Eclipse Galileo to deploy my EAR application and run a JBoss server
(version 5.1.0GA).
In order to work with Drools, I added the following jars under my JBoss
configuration lib/ folder: drools-api.jar, drools-compiler.jar,
drools-core.jar
My EAR include 2 .drl files - one is loaded and executed in a Servlet that
is loading on startup when JBoss is booting, and the other is loading and
running from the EJB layer.
When JBoss is launched from scratch, the rules get executed normally.
The rules get executed normally also when JBoss is stopped and started
again.
When I republish my EAR while JBoss is running, Eclipse will undeploy the
old EAR and redeploy the new EAR, as it would normally do.
However, in this case (republish/redeploy), no rules get executed except
rules with empty "when" clause.
I found a solution for this problem by replacing the 3 drools jar files from
version 5.1.1 to version 5.0.1.
In addition to my EAR, the JBoss server also runs Guvnor war. Guvnor 5.1.1
includes new features that I would like to use.
As I understand, reverting the 3 jars to 5.0.1 means I cannot use Guvnor
v5.1.1.
I would appreciate help with solving this problem.
Best regards,
Ran
Ran Mochary
Delegate Communications
13 years, 9 months
How to get correct version of rules based on effective date
by Faisal Shafique
Hi,
We are evaluating Drools to replace a big legacy eligibility system in government sector. One of the critical requirement is to have the system pull correct rule based on a date e.g interest rate was 5% till 12/31/2010 but changed to 6% from 1/1/2011. If we are running rules in 2010 or before, calculation should use 5% else it should use 6%. Rules will run with a user clicking a button and results will be shown to user so probably a StatelessSession will be used. Something like AgendaFilters to filter rules based on a date probably will not be very scalable since over time we'll have lot of different temporal version of rules and all of them will have to be in KnowledgeBase for AgendaFilter to work which will be memory intensive and un-needed.IMHO, we should build KnowledgeBase with correct version of rules in the first place. Any ideas or pointers?
Thanks
13 years, 9 months
Does this work - create new facts in session and add to other facts?
by Thomas Adler
Hi,
I am trying to use Drools and I would like to check whether such scenario could work:
I have facts Document and Line (EJB3 beans, in fact). And Document class has attribute:
List<Line> lines
So - I would like to pass to stateless session a Document instance "document" and I would like to write rule, that
1) create some new Lines;
2) calculates total from lines;
3) updates document.total;
4) add new Lines instances, that where created during the rule execution to document.lines;
And at the end of execution of this session I will like to do some other things with document and document.lines, e.g. persist in database.
So - can Drools handle such create of associations during the session execution?
Thanks!
Thomas
13 years, 9 months
Autoreply: Travis Smith is out of the office
by Travis_Smith@bnz.co.nz
I will be out of the office starting 18/02/2011 and will return on
06/03/2011.
I am on Annual Leave for the above duration.
For any URGENT issues in Lending Manager, HotDocs or Transact, please
contact BNZ Systems Support.
Regards,
-Trav
_______________________________________________
Travis Smith
Analyst Programmer
BTS Development Centre
Tel: +64 4 474 6356 Email: Travis_Smith(a)bnz.co.nz
CAUTION - This message may contain privileged and confidential information
intended only for the use of the addressee named above. If you are not the
intended recipient of this message you are hereby notified that any use,
dissemination, distribution or reproduction of this message is prohibited.
This email was sent by the Bank of New Zealand. You can contact us on
0800 ASK BNZ (0800 275 269). Any views expressed in this message are those
of the individual sender and may not necessarily reflect the views of Bank
of New Zealand.
13 years, 9 months
Eclipse IDE not validating .drl files
by StormeHawke
So it's been a while since I did any work with drools, so I don't know how
long this problem has been here, but I recently started working on a new
Drools project, using the latest Drools Eclipse IDE. Back on my previous
Drools project, if I had a syntax error in my code it would give me compile
errors in the IDE (I didn't have to wait until runtime). These syntax
errors didn't always make sense, but they were generally helpful for finding
misplaced semicolons and capitalization issues.
The latest version of the Drools IDE does not seem to do this any more. Is
this a deliberate change or is there something wrong with my configuration?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Eclipse-IDE-not-valid...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months