Combining Drools Expert and Planner
by Phani Saripalli
Hi.
Is it possible to combine Drools expert and planner to solve NP problems (or
some kind of model checking).
For example, I have a model described as a .drl file
declare Project
x : int
end
And, then I have a constraint (or rule) - something like this -
rule " Rule on x"
agenda-group "Group 2"
dialect "mvel"
no-loop true
when
P : Project(P.x > 5 && P.x < 7)
then
System.out.println("Rule satisfied");
end
Is it possible to obtain a value propagation mechanism by combining with
Planner, by which I finally get a value for x as 6 ?
I am working on model checking for models that have various constraints, on
boolean, int, real, strings, container types and also on types that are
similar to C structs. There is hardly any reasoner/solver that does model
checking for constraints on such a varied types of datatypes.
I checked planner, but defining planning variables and stuff on score
generation seemed to me a bit new and confusing.
Thank you :)
--
View this message in context: http://drools.46999.n3.nabble.com/Combining-Drools-Expert-and-Planner-tp4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 6 months
Re: [rules-users] Classcast exception in Drools ant task
by Mutyala Suresh kumar
Hi All,
Can someone please help me solve this issue?
Thanks and Regards,
Suresh Kumar Mutyala
________________________________
From: "rules-users-request(a)lists.jboss.org" <rules-users-request(a)lists.jboss.org>
To: rules-users(a)lists.jboss.org
Sent: Thursday, 20 September 2012 4:17 AM
Subject: rules-users Digest, Vol 70, Issue 65
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Planner Planning Entity difficulty comparator Vs difficulty
weight factory (Ricardo)
2. Examination drools-planner example (kostis)
3. Re: Examination drools-planner example (Geoffrey De Smet)
4. Re: Planner Planning Entity difficulty comparator Vs
difficulty weight factory (Geoffrey De Smet)
5. Re: Planner Planning Entity difficulty comparator Vs
difficulty weight factory (ge0ffrey)
6. Re: planning difficulty problem (Geoffrey De Smet)
7. Classcast exception in Drools ant task (Mutyala Suresh kumar)
----------------------------------------------------------------------
Message: 1
Date: Wed, 19 Sep 2012 16:49:39 -0700 (PDT)
From: Ricardo <sprabakkar(a)gmail.com>
Subject: [rules-users] Planner Planning Entity difficulty comparator
Vs difficulty weight factory
To: rules-users(a)lists.jboss.org
Message-ID: <1348098579210-4019858.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
when to use Planner Planning Entity difficulty comparator and difficulty
weight factory? is any guidelines?
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
------------------------------
Message: 2
Date: Wed, 19 Sep 2012 23:06:22 -0700 (PDT)
From: kostis <epp687(a)gmail.com>
Subject: [rules-users] Examination drools-planner example
To: rules-users(a)lists.jboss.org
Message-ID: <1348121182201-4019859.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
Hello,
Is there any guidance about the domain model of the examination example?
The class InstitutionalWeighting has some properties that I cannot undestand
the purpose of them
Thank you
--
View this message in context: http://drools.46999.n3.nabble.com/Examination-drools-planner-example-tp40...
Sent from the Drools: User forum mailing list archive at Nabble.com.
------------------------------
Message: 3
Date: Thu, 20 Sep 2012 09:19:05 +0200
From: Geoffrey De Smet <ge0ffrey.spam(a)gmail.com>
Subject: Re: [rules-users] Examination drools-planner example
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID: <505AC369.8040004(a)gmail.com>
Content-Type: text/plain; charset="us-ascii"
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120920/e77b5ef...
------------------------------
Message: 4
Date: Thu, 20 Sep 2012 09:23:07 +0200
From: Geoffrey De Smet <ge0ffrey.spam(a)gmail.com>
Subject: Re: [rules-users] Planner Planning Entity difficulty
comparator Vs difficulty weight factory
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID: <505AC45B.9080605(a)gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
[I locally answered this question last time already, but it looks like
my mail never reached the mailing list due to a local misconfiguration
at the time]
Op 20-09-12 01:49, Ricardo schreef:
> when to use Planner Planning Entity difficulty comparator and difficulty
> weight factory? is any guidelines?
Use a difficulty comparator if you can: it's the easy variant.
A difficulty weight factory is needed only if you need the entire
Solution (not just the entity) to calculate the difficulty of a given
entity.
In the examples, look for *DifficultyComparator and
*DifficultyWeightFactory.
>
>
>
> -----
> with kind regards,
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comp...
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
------------------------------
Message: 5
Date: Thu, 20 Sep 2012 00:23:56 -0700 (PDT)
From: ge0ffrey <ge0ffrey.spam(a)gmail.com>
Subject: Re: [rules-users] Planner Planning Entity difficulty
comparator Vs difficulty weight factory
To: rules-users(a)lists.jboss.org
Message-ID: <1348125836746-4019861.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
See
http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comp...
<http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comp...>
--
View this message in context: http://drools.46999.n3.nabble.com/Planner-Planning-Entity-difficulty-comp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
------------------------------
Message: 6
Date: Thu, 20 Sep 2012 09:26:16 +0200
From: Geoffrey De Smet <ge0ffrey.spam(a)gmail.com>
Subject: Re: [rules-users] planning difficulty problem
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID: <505AC518.9030001(a)gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
[I locally answered this question last time already, but it looks like
my mail never reached the mailing list due to a local misconfiguration
at the time]
If it's in anything like the nurse rostering example, I would presume
the following domain:
- Planning entity: ShiftAssignment. There are 9 (3 shifts for 3 hospitals)
- Planning variable: ShiftAssignment.get/setDoctor()
- Planning values for that variable: 10 doctors
So Planner will put a doctor in each of those 9 ShiftAssignments and 1
doctor won't be assigned to any shift.
Actually, Planner might assign the same 2 doctor to 2 different
ShiftAssignments if none of the constraints are broken (such as "no 2
ShiftAssignements at the same time for the same doctor").
See nurse rostering example. Play around with it. Take a look at this
video about contentious planning with nurse rostering:
http://blog.athico.com/2012/08/continuous-planning-video.html
Mentally replace "nurse" with "doctor" and "department" with "hospital".
Op 20-09-12 01:46, Ricardo schreef:
> For example , I have 10 doctors planning for 3 hospitals in three shifts,
> each hospital take maximum limit of 3 doctors only, In this case I have one
> remaining doctor unassigned. My doubt is how planner handle this data? will
> it be rejected or consider in other cycle or overwrite the planner solution?
> please advise...
>
> thanks,
>
>
>
> -----
> with kind regards,
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/planning-difficulty-problem-tp4019857.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
------------------------------
Message: 7
Date: Thu, 20 Sep 2012 16:17:33 +0800 (SGT)
From: Mutyala Suresh kumar <sk_mutyala(a)yahoo.co.in>
Subject: [rules-users] Classcast exception in Drools ant task
To: "rules-users(a)lists.jboss.org" <rules-users(a)lists.jboss.org>
Message-ID:
<1348129053.80952.YahooMailNeo(a)web190805.mail.sg3.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi All,
I am trying to build a sample drools project using ant and getting the below error. I am using "drools-distribution-5.4.0.Final" release jars in my project. Unable to get this issue resolved as not sure what really went wrong.
RuleBaseTask failed: Unable to load dialect 'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel:org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration'
? ? ? ? at org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:159)
? ? ? ? at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
? ? ? ? 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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
? ? ? ? at org.apache.tools.ant.Task.perform(Task.java:348)
? ? ? ? at org.apache.tools.ant.Target.execute(Target.java:357)
? ? ? ? at org.apache.tools.ant.Target.performTasks(Target.java:385)
? ? ? ? at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
? ? ? ? at org.apache.tools.ant.Project.executeTarget(Project.java:1307)
? ? ? ? at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
? ? ? ? at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:33)
? ? ? ? at org.apache.tools.ant.Project.executeTargets(Project.java:1191)
? ? ? ? at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
? ? ? ? at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
Caused by: org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel:org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration'
? ? ? ? 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:140)
? ? ? ? at org.drools.contrib.DroolsCompilerAntTask.getPackageBuilder(DroolsCompilerAntTask.java:556)
? ? ? ? at org.drools.contrib.DroolsCompilerAntTask.createWithPackageBuilder(DroolsCompilerAntTask.java:266)
? ? ? ? at org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:156)
? ? ? ? at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
? ? ? ? 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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
? ? ? ? at org.apache.tools.ant.Task.perform(Task.java:348)
? ? ? ? at org.apache.tools.ant.Target.execute(Target.java:357)
? ? ? ? at org.apache.tools.ant.Target.performTasks(Target.java:385)
? ? ? ? at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
? ? ? ? at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
? ? ? ? at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
? ? ? ? at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
? ? ? ? at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
? ? ? ? ... 2 more
Caused by: java.lang.ClassCastException: org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration
? ? ? ? at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:308)
? ? ? ? at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:298)
? ? ? ? at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:189)
? ? ? ? at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:142)
? ? ? ? at org.drools.contrib.DroolsCompilerAntTask.getPackageBuilder(DroolsCompilerAntTask.java:558)
? ? ? ? at org.drools.contrib.DroolsCompilerAntTask.createWithPackageBuilder(DroolsCompilerAntTask.java:266)
? ? ? ? at org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:156)
? ? ? ? at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
? ? ? ? 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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
? ? ? ? at org.apache.tools.ant.Task.perform(Task.java:348)
? ? ? ? at org.apache.tools.ant.Target.execute(Target.java:357)
? ? ? ? at org.apache.tools.ant.Target.performTasks(Target.java:385)
? ? ? ? at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
? ? ? ? at org.apache.tools.ant.Project.executeTarget(Project.java:1307)
? ? ? ? at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
? ? ? ? at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:33)
? ? ? ? at org.apache.tools.ant.Project.executeTargets(Project.java:1191)
? ? ? ? ... 2 more
Below is the list of jars added to my classpath,
--------------------------------------------
antlr-runtime.jar
drools-ant-5.4.0.Final.jar
drools-compiler-5.4.0.Final.jar
drools-core-5.4.0.Final.jar
drools-decisiontables-5.4.0.Final.jar
drools-jsr94-5.4.0.Final.jar
drools-persistence-jpa-5.4.0.Final.jar
drools-templates-5.4.0.Final.jar
drools-verifier-5.4.0.Final.jar
droolsjbpm-ide-common-5.4.0.Final.jar
jbpm-bpmn2.jar
jbpm-flow-builder.jar
jbpm-flow.jar
jsr94.jar
junit.jar
jxl.jar
knowledge-api.jar
knowledge-internal-api.jar
mvel2.jar
org.eclipse.jdt.core_3.6.1.v_A68_R36x.jar
xmlpull.jar
xpp3_min.jar
xstream.jar
build.xml
---------
<project name="DroolsProto" default="dist" basedir=".">
? ? ? ? <property name="build.src" location="src"/>
? ? ? ? <property name="build.target" location="target"/>
? ? ? ? <property name="build.dist" ?location="dist"/>
? ? ? ? <path id="build.lib.path">
? ? ? ? ? ? ? ? <fileset dir="${build.src}/lib">
? ? ? ? ? ? ? ? ? ? ? ? <include name="**/*.jar"/>
? ? ? ? ? ? ? ? </fileset>
? ? ? ? </path>
? ? ? ?
? ? ? ? <taskdef name="droolscompiler" classname="org.drools.contrib.DroolsCompilerAntTask">
? ? ? ? ? ? ? ? <classpath refid="build.lib.path"/>
? ? ? ? </taskdef>
? ? ? ? <target name="clean">
? ? ? ? ? ? ? ? <delete dir="${build.target}"/>
? ? ? ? ? ? ? ? <delete dir="${build.dist}"/>
? ? ? ? </target>
? ? ? ? <target name="init">
? ? ? ? ? ? ? ? <tstamp/>
? ? ? ? ? ? ? ? <mkdir dir="${build.target}"/>
? ? ? ? ? ? ? ? <mkdir dir="${build.dist}"/>
? ? ? ? ? ? ? ? <record name="build.log" loglevel="verbose" append="false"/>
? ? ? ? </target>
? ? ? ? <target name="compile" depends="init">
? ? ? ? ? ? ? ? <mkdir dir="${build.target}/classes"/>
? ? ? ? ? ? ? ? <javac srcdir="${build.src}/main/java" destdir="${build.target}/classes">
? ? ? ? ? ? ? ? ? ? ? ? <classpath refid="build.lib.path"/>
? ? ? ? ? ? ? ? ? ? ? ? <include name="**/*.java"/>
? ? ? ? ? ? ? ? </javac>
? ? ? ? </target>
? ? ? ? <target name="compile-rules">
? ? ? ? ? ? ? ? <property name="pathelements" refid="build.lib.path"/>
? ? ? ? ? ? ? ? <droolscompiler srcDir="${build.src}/main/rules"
? ? ? ? ? ? ? ? ? ? ? ? toFile="${build.target}/classes/drl.pkg"
? ? ? ? ? ? ? ? ? ? ? ? classpathref="build.lib.path">
? ? ? ? ? ? ? ? ? ? ? ? <include name="*.drl" />
? ? ? ? ? ? ? ? </droolscompiler>
? ? ? ? </target>
? ? ? ?
? ? ? ? <target name="bundle-resources" depends="compile-rules">
? ? ? ? ? ? ? ? <copy todir="${build.target}/classes">
? ? ? ? ? ? ? ? ? ? ? ? <fileset dir="${build.src}/main/resources"/>
? ? ? ? ? ? ? ? </copy>
? ? ? ? </target>
? ? ? ?
? ? ? ? <target name="dist" depends="compile,bundle-resources"/>
</project>
Thanks in advance,
Suresh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120920/b5fb38c...
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 70, Issue 65
*******************************************
13 years, 6 months
Drools Planner - Vehicle Routing, but a little different
by jimirn
Hi,
I hope someone can tell me what I am doing wrong.
I am trying to kind of do the same as the Vehicle Routing example.
My domain is:
- Consultant (the person that will drive to a DeliveryPlace and spent some
time there, each Consultant has a max total time available)
- DeliveryPlace (the place where a Consultant will drive to and spent some
time making a delivery)
- Location (a Consultant has a home and a DeliveryPlace has a location)
So basicly there could be X Consultants who has to make deliveries to Y
DeliveryPlace's. And I want to figure out the best way of doing that.
Right now my code does not find any doable moves:
16:51:57.654 [main] INFO o.d.p.c.c.g.DefaultGreedyFitSolverPhase - Phase
constructionHeuristic ended: step total (0), time spend (86), best score
(0hard/0soft).
16:51:57.658 [main] WARN o.d.p.c.l.DefaultLocalSearchSolverPhase -
Cancelled step index (0), time spend (89): there is no doable move.
Terminating phase early.
16:51:57.658 [main] INFO o.d.p.c.l.DefaultLocalSearchSolverPhase - Phase
localSearch ended: step total (0), time spend (90), best score
(0hard/0soft).
Here is the source code, modified from the Vehicle Routing example:
src.tar.gz <http://drools.46999.n3.nabble.com/file/n4019907/src.tar.gz>
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-Routing-but-a-li...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 6 months
Guvnor encoding issue
by Fernando Penagos
Hi everyone,
I'm working whit Drools 5.4.0 final and the last version of Guvnor (5.40
final). I'm using eclipse as IDE.
The problem is whit this kind of actions that i have to use in my rules:
$asegurado.agregarExamenDeAsegurabilidad( "TRANSCRIPCION COPIA DEL
RESULTADO DE LA ULTIMA MAMOGRAFIA (NO MAYOR A UN A*Ñ*O)" );
In this action the result is an insertion on an Array but if you observe
there is a 'Ñ' and when i run the test i get something like:
TRANSCRIPCION COPIA DEL RESULTADO DE LA ULTIMA CITOLOGIA (NO MAYOR A UN *
AÑO*)
So the rule is never true.
I've tried whit some advises in the forums like insert
"-Dfile.encoding=ISO-8859-1" (i try with UTF-8 and Cp1252 too) on the
arguments of the server i'm using to deploy guvnor but the problem remains
plus other like try to save the file with an specific encode.
I already try to adding and "encoding" parameter to the "kagent" like this:
String encoding = "UTF-8";
kagent.applyChangeSet( ResourceFactory.newClassPathResource(
"changeset.xml"),encoding);
But nothing seems to work. What am I doing wrong??
I hope you can help me and thank you all.
--
Yuliban Fernando Penagos Gómez
Ingeniería de Sistemas
Universidad Distrital Francisco José de Caldas
13 years, 6 months
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
13 years, 6 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
13 years, 6 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
13 years, 6 months