Drools 5.4.0 Final library problem
by Eric Davison
I am having a small problem, I have Drools 5.4.0.Final installed, I
have Eclipse Indigo, Java JRE 5.0(or JRE and JDK 1.6), and the Drools
Plugin. I am attempting to run the hello world example. So the
problem is I am getting this error:
org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:313)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:298)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:187)
at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:165)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:301)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:229)
at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryServiceImpl.java:34)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:46)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:39)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not
in the classpath
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:96)
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:57)
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:309)
... 9 more
I understood this to be fixed in this version, so I firmly believe
that I have hosed something up here. I think I have just stared at it
too long.
I have validated that I have the following in the Installed Software
Tab of the Eclipse Installation Details: Drools Core 5.4.0.Final,
Drools Guvnor 5.4.0.Final, jBPMCore 5.4.0.Final, and jBPM Task
5.4.0.Final.
Also I have Drools Eclipse Plug-ins installed under the Plug-ins tab.
All of them are 5.4.0.Final
I have JAVA_HOME set to C:\Program Files\Java\jdk1.6.0_30 and it is
also in my Path %JAVA_HOME%\bin.
Also the compiler settings in Eclipse are set for 1.6, and ensured
that the jdk1.6.0_30 is part of the project. Also the Drools Library
is there and has drools-core.jar contained in it.
If you have any suggestions please send them my way.
Thank you,
Eric
12 years, 3 months
4 Weeks Until Intellifest - Register soon to learn about Drools & jBPM.
by Mark Proctor
Only 4 weeks to go for IntelliFest 2012, in San Diego, start Monday 22nd of October.
Program Overview ( detailed agenda for Monday and Tuesday below ):
Monday - Healthcare focus for Rules, Workflow, Ontologies and Events (Free)
Tuesday - General Drools&jBPM session (Free)
Tuesday - Rule Design Patterns in Production Rule Systems
Wed - Fri - General IntelliFest Sessions
There are limited spaces, so register soon here.
Monday - Healthcare focus for Rules, Workflow, Ontologies and Events (free)
0830-0920 Captain Emory Fry, MD
Socratic Grid : Open Source Distributed Decision Support for Healthcare
0930-1020 Dr Robert Greenes, Department of Biomedical Informatics, Arizona State University
Key Note : Embedding Decision Support in Clinical Systems
1030-1120 Dr Aziz Boxwala, Division of Biomedical Informatics, University of California
Clinical Decision Support Consortium
1130-1200 Dr Seong Ki Mun, President and CEO of OSEHRA
Open Source Electronic Health Record Agent
1200:1300 Lunch
1300-1350 Dr Davide Sottara, Department of Biomedical Informatics, Arizona State University
Knowledge Representation Standards For Building Executable Clinical Processes Models
1400-1450 David Shields, Health ITS, University of Utah
OpenCDS: a Clinical Decision Support Infrastructure Based on Drools
1500-1520 Harold Solbring, Division of Biomedical Informatics, Mayo Clinic
Semantic Wiki
1530-1655 Conor Dowling, Caregraf
Semantic Terminology Services
1600-1620 Dr Xiao Hu, Department of Neurosurgery, University of California
Clinical Decision Support Driven Alarms
1630-1700
Panel Discussion - Collaboration Opportunities
Tuesday - General Drools&jBPM Workshop (free)
8.00 AM: Breakfast Social – pre-laptop setup, and QA time with solution Architects.
-Key will be provided to setup your laptop, so you can view and run the examples used during the talks.
9.00 BRMS Product Overview (Prakash Aradhya 15min)
How we turn the Drools and jBPM communtiy parts into a world class product. Supporting and harvesting all the innovation done in the open community, Red Hat delivers reliable, dependable and integrated solutions for enterprise customers.
9.15 Introduction to Drools Expert (Mark Proctor 45min)
Drools Expert covers the business rule engine. A gentle, example driven, dive into the Drools technical rule language and engine features.
10.10 Introduction to Drools Fusion (Edson Tirelli 45min)
Learn how Drools does CEP differently. Our unified approach extends Drools Expert with a series of language and sub-engine extensions to provide temporal reasoning and event correlation.
11.05 Introduction to jBPM and BPMN2 (Kris Verlaenen 45min)
jBPM is a BPM engine designed for flexible processes, implementing and extending the BPMN2 spec. Built form the ground up to be part of a unified strategy for business automation and decision management. jBPM fully integrates with Drools Expert and Fusion.
11.45 Decision Modelling with Graphical Editors (Edson Tirelli 30min)
Drools Expert provides sophisticated web based tooling, around decision tables, guided editors and templates. Our decision modelling approach draws from the very best research found at Dr Jan Vanthienien school of Decision Modelling.
12.30 Working Lunch – Experience Drools and jBPM – Hands on labs (Optional) (1hour)
13.30 Human Tasks up Close and Personal (Kris Verlaenen 40min)
Human tasks are a central component of BPM. This example driven talk will build an example live, demonstrating what jBPM’s Human Task technology can do for you.
14.20 Building Games with Drools – Pong, Snake and Wumpus (Mark Proctor 40min)
Time for some hard play, learn how to build classic computer games with Drools. These also provide interesting exercises in BA requirements gathering.
15.10 Drools Planner a Quick Overview (Geoffrey De Smet 40min)
Whether it’s employee rostering, task scheduling, vehicle routing, bin packing or another planning problem: all organizations try to optimize their limited resources under constraints. Drools Planner optimizes business resources for normal Java programmers.
15.50 Drools Chance for Imperfect Reasoning (Davide Sottara 40min)
Sometimes data quality is not perfect, so facts may not be known with precision and certainty. Likewise, crisp constraints such as hard thresholds might not be able to capture the complexity of a business policy. Drools Chance allows to apply gradual and/or probabilistic constraints to uncertain or vague data.
16.40 UberFire – Drools&jBPM Workbench framework (Mark Proctor 30min)
UberFire is a new project that forms the foundation of our 6.0 web tooling. It’s standalone framework that provides a sophisticated workbench framework for the web; where everything is a plugin. Come learn about the Uberfire, and how you can use the workbench to build your own web applications.
17.10 Drools&jBPM 6.0 and Beyond (Optional : open as long as people remain)
An open presentation and discussion about the design ideas, principles and goals that are driving the development of Drools & jBPM version 6.0. This will be an optional and informal session where attendees will have the opportunity to learn about what is coming, contribute ideas and provide feedback that will be taken in consideration by the development team.
17.10 Hands on Lab
Run at the same time as "Drools&jBPM and Beyond" and Beyond. Solution Architects are on hand to help you with your coding problems, and running examples.
Tuesday - Rule Design Patterns in Production Systems
Rule Design Patterns
What is a “Rule Design Pattern”?
Basic Rule Formats
Fact Classification
Handling Failure to Match
Extending Rules
Reasoning with Interfaces
Active Facts
Marker Facts
Fact Proxies
Application Design Patterns
Short-Term Sessions
Permanent Sessions
12 years, 3 months
"factorize" rules
by John Dujon
Hello,
I am trying to make my rules more readable and wonder wether or not we can
factorize rules for a particular ruleflow-group. As an example, I would
like to convert this:
// begin rules
rule "Rule 1"
ruleflow-group "work"
when
condition 0
condition1
then
doSomething();
rule "Rule 2"
ruleflow-group "work"
when
condition0
condition2
then
doSomethingElse();
// end rules
to the following
// begin rules
pre_conditions_for_rules
ruleflow-group "work"
condition0
rule "Rule 1"
ruleflow-group "work"
when
condition1
then
doSomething();
end
rule "Rule 2"
ruleflow-group "work"
when
condition2
then
doSomethingElse();
end
// end rules
Thank you for your time. I apologize in advance if that does not make
sense, as I am new to drools
John
12 years, 3 months
Deserialzation Error running test example
by richard
I get this error running either with Netbeans or Eclispe.
I downloaded source from github.
Lastest Guvnor too.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
java.lang.RuntimeException: KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:787)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1094)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:835)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:675)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:206)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
at
org.drools.guvnor.examples.mortgage.client.MortgageClientExample.readKnowledgeBase(MortgageClientExample.java:92)
at
org.drools.guvnor.examples.mortgage.client.MortgageClientExample.main(MortgageClientExample.java:49)
at
org.drools.guvnor.examples.GuvnorExamplesApp$1.actionPerformed(GuvnorExamplesApp.java:50)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.FileNotFoundException:
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/packages/mor...
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:210)
at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:146)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:750)
... 44 more
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.util.AbstractCollection.addAll(Unknown Source)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1100)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:835)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:675)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:206)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
at
org.drools.guvnor.examples.mortgage.client.MortgageClientExample.readKnowledgeBase(MortgageClientExample.java:92)
at
org.drools.guvnor.examples.mortgage.client.MortgageClientExample.main(MortgageClientExample.java:49)
at
org.drools.guvnor.examples.GuvnorExamplesApp$1.actionPerformed(GuvnorExamplesApp.java:50)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
--
View this message in context: http://drools.46999.n3.nabble.com/Deserialzation-Error-running-test-examp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Which proper way to test for Event expiration in Drools Fusion?
by tari-manga
Ciao, I've used successfully Drools Expert in past project, now I'm
experimenting with Drools Fusion but I can't seem to grasp correctly how
Event expiration works.
I do understand from the documentation: you must have the knowledge base
setup as STREAM, that you must inject Events in chronological order, and
then for the engine to correctly compute the expiration correctly you must
have defined temporal constraints between Events in the LHS of the rules.
Now let's suppose that for a specific Event there is only 1 rule, and this 1
rule picks the Event from a window of length 1, I would have assumed the
engine would automatically expire all the past Events, with the exception of
not expiring only the last one inserted?
For example:
I have some simple coding by having modified the "Hello World" code
generated by Drools IDE, I have 5.4.0.Final, and documented fully in a
http://stackoverflow.com/questions/12338385/test-event-expiration-in-droo...
StackOverflow question . The Message is declared as Event, I inject 2 of
them and even if I advance the pseudo clock to the far future, neither of
the Message Event by inspecting the EventHandle seems to be expired==true?
I was expecting the EventHandle for the very first Message Event inserted,
to have expired==true but that is not the case, all the EventHandle have
expired==false and I'm seriously puzzled why?
I was wondering if somebody have a simple example to share where he was
successfully able to inspect all the EventHandle for expiration, or if
anybody can see what I'm doing wrong, please?
Thank you very much in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Which-proper-way-to-test-for-Event-expi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Capturing DDLs from Guvnor
by dme1
Hi,
I have configured Guvnor to work with Oracle. With this configuration I can
see that Guvnor uses my Oracle Database as the datastore, and creates the
necessary tables in the Oracle database. I want to capture the Oracle "DDLs"
that Guvnor (Jackrabbit) builds to create the table in the Oracle Database,
this is required to facilitate application and installs in different
environments in the organization.
I can go to the database and create the DDLs from there, but am wondering if
there is an easier way to achieve the same.
Thanks,
dme
--
View this message in context: http://drools.46999.n3.nabble.com/Capturing-DDLs-from-Guvnor-tp4019855.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Issue serializing KnowledgePackage with hibernate
by gqmulligan
I am using drools 5.3.1.
I have a case where I need to recompile and update many knowledge packages
within a single hibernate session. The problem I am facing is that with
each subsequent select I do to get the next knowledge package, an extra
update is done for every knowledge package updated so far.
I dug into the code and think I found the issue. Hibernate returns a new
knowledge package that it puts in its cache after updating. When hibernate
later does a check to see if this object has changed since it was last saved
it always thinks there was a change for the following reasons:
1.) The knowledge package does not reference the same object.
2.) The internal package is not the same reference (it does an identity
check in the equals method of the KnowledgePackageImpl)
3.) The serialized bytes are compared and are for some reason different even
though no changes were made to the knowledge package.
Somehow it seems I need to get hibernate to know that the knowledge package
did not change since the last update. Is there an easy way to do this? It
seems like number 2 or 3 from above should work but fail for the reasons
given.
Otherwise the only workaround I can think of would be too load all knowledge
packages that will need to be updated first, recompile them all, and then
update them all at once. This is not the simplest thing to do with the way
things currently work so it would be great if hibernate could handle this
for me.
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/Issue-serializing-KnowledgePackage-with...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
rules file character encoding and spring
by Joachim Van der Auwera
I have a rules description like this:
<drools:kbase id="bodKBase">
<drools:resources>
<drools:resource type="DRL"
source="classpath:be/vlaanderen/awv/dc/bod/rule/Dienstbevel.drl"/>
<drools:resource type="DRL"
source="classpath:be/vlaanderen/awv/dc/bod/rule/Kostenberekening.drl"/>
</drools:resources>
</drools:kbase>
How can I specify the character encoding for this?
It is working fine on linux (everything is UTF-8), but gives a problem on
Windows machine where it complains about the character set.
Thanks for the help.
Kind regards,
Joachim
12 years, 3 months