Drools 6 and dynamic update
by Nicolas Héron
Hi All,
In previous Drools version (5.3, 5.4, 55 and 5.6RC1), it was possible to
dynamically update the package content from Guvnor.
The use case was :
1) Some rules are created/updated/deleted on Guvnor
2) A new snapshot is built
3) The drools runtime is notified and reload a new knowledgeBase from this
new snapshot. (For this we developed some code to do that). No need to
redeploy a new application. No need for IT people to be involved.
4) It was possible to see the content of each snapshot and compare the
content of different snapshot.
Now in Version 6 :
Step 1 : no change
Step 2 : as all in Maven => We build a new maven build an increment the
version number
Step 3 : is is possible to do that ? How do I set in all that the new
Drools-wb maven repo ?
Step 4 : how can I do that from the UI ?
Thanks in advance
Nicolas Héron
11 years
[Announce] EulerGUI 2.0
by Jean-Marc Vanel
Hi
I am pleased to announce the release 2.0 of EulerGUI, a development tool
and a framework for rules and the Semantic Web, under LGPL license, in Java
and Scala.
As was already told on this list, EulerGUI has Drools under the hood, plus
4 other rules engines, and integration with controled (formal) english (
ATTEMPTO <http://attempto.ifi.uzh.ch/site/>). EulerGUI does not use POJO
classes for business data modelization, but Semantic Web
triples<http://www.w3.org/2000/10/swap/Primer>
.
The accent in this release is the new N3 file format for projects, that is
OWL (and Protégé) compatible. Here is an example:
http://svn.code.sf.net/p/eulergui/code/trunk/eulergui/examples/newproject...
EulerGUI has SPARQL queries, drag'n'drop, local cache Apache Jena TDB
triple store <http://jena.apache.org/documentation/tdb/> and more...
The current developments for 2.1 are towards 100% Scala code,
modularization, quicker startup, and customizable domain applications based
on generic semantic -aware widgets.
For a complete list of changes, the change log is here:
http://svn.code.sf.net/p/eulergui/code/trunk/eulergui/CHANGELOG
DOWNLOAD:
https://sourceforge.net/projects/eulergui/files/eulergui/2.0/
And the ever updated User Manual is here:
http://svn.code.sf.net/p/eulergui/code/trunk/eulergui/html/documentation....
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://deductions-software.com/
+33 (0)6 89 16 29 52
Twitter: @jmvanel ; chat: irc://irc.freenode.net#eulergui
11 years
Drools 5.5.0 - Execution Performance
by ch3xy
Hello,
first of all I'd like to mention that i am pretty new to Drools, so please
be patient :-)
We are using Drools 5.5.0. we have a knowledgeBase of about 500 rules and a
pretty complex object structure. So far everything is working fine … at the
moment we are testing the performance of the engine and we encountered a
quite strange thing. We generated about 10 objects, inserted it into the
session and measured time needed for execution of rules. To simulate a high
number of facts, we inserted the same objects over and over again (100x,
1000x, 10000x). When the first objects were inserted, the time of execution
was about 100ms but for each iteration the execution got faster and faster
(20ms, 10ms and later on even 1ms) ..
Now my question: Are the objects somehow cached in the working memory, so
that execution gets faster or does this increase of performance has an other
reason? I read a few things about shadow facts which are not present anymore
since Drools 5 and sync and async Rete and I think this could be a potential
answer for my question, but I am not able to understand this completely. For
me it is important to know whether the increase of performance is only due
to the fact that we are inserting the same facts over and over again or if a
significant increase of performance is still possible if facts are not
identical?
Can someone help me?
Thanks in advance
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp40...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
BUG: Can't build a rete network with an inner OR group element
by braveheart85
Hello guys,
I have just obtained this DroolsRuntimeException when i perform this rule:
$result : Number( ) from accumulate
(
($y: Year( ) from $o.data) &&
(Family( $relatives : relative ) from $y.familyEntity),
init( double total = 0; ),
action( total += $relatives.size(); ),
reverse( total -= $relatives.size(); ),
result( total ) )
I saw that this is a known bug in version 5.3.0. I'm developing with 5.5.0
Final.
Exists any workaround or version 5.6.0 resolve this bug?
Best regards
Andrea
--
View this message in context: http://drools.46999.n3.nabble.com/BUG-Can-t-build-a-rete-network-with-an-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
matches / not maches
by Peter Troelsen
Hey..
I have encountered a problem using the 'maches' operator in drool.. I wanna
write something like this (just made a simple example)
rule "Hello World"
when
m: Message("5" matches "5")
then
System.out.println("Test");
end
But eclipse tells me " '"5" ~= "5"' must be an boolean expression ", and i
get an runtime error if i try to run it.. However if I use 'not matches' it
works! Forcing me to do something like this:
when
not m: Message("5" not matches "5")
then
Any ideas how to fix this?
- Thanks!
--
Peter
11 years
Jetty NoSuchMethodError Lorg/eclipse/jdt/core/compiler/CategorizedProblem
by captainrhino
I am running some drools application code through Jetty and I get the
following error. I'm guessing its something to do with a conflicting jar or
dependency? Any help would be much appreciated. It does not happen when I
run it through tomcat 7.
java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;
at
org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(EclipseJavaCompiler.java:375)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)
at
org.drools.compiler.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:405)
at
org.drools.compiler.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at
org.drools.compiler.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:405)
at
org.drools.compiler.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at
org.drools.compiler.compiler.PackageRegistry.compileAll(PackageRegistry.java:107)
at
org.drools.compiler.compiler.PackageBuilder.compileAll(PackageBuilder.java:1218)
at
org.drools.compiler.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:955)
at
org.drools.compiler.compiler.PackageBuilder.addPackage(PackageBuilder.java:943)
at
org.drools.compiler.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:507)
at
org.drools.compiler.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:714)
at
org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at
org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)
--
View this message in context: http://drools.46999.n3.nabble.com/Jetty-NoSuchMethodError-Lorg-eclipse-jd...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
CurriculumCourse - extending for multiple teachers per course
by clients
Hi,
I have been playing around with the optaplanner library for the past couple
of weeks trying to learn a bit of the basics. I have been making some
progress but I have a simple variation I am trying to accomplish to the
stock CurriculumCourse example and am hitting a wall.
What I am trying to do is modify the CurriculumCourse example to also allow
the teachers to be planning variables. I plan on extending it to give
constraints on which courses individual teachers can teach, but to start I
am just assuming each teacher can teach any class to make things easier.
- First I tried to add the Course entity as a second planning entity with
the teacher being a PlanningVariable but keep on running into an exception
based on the solver configuration
java.lang.IllegalArgumentException: The entityPlacerConfig
(QueuedEntityPlacerConfig(null, null)) has no entitySelector configured and
because there are multiple in the planningEntityClassSet ([class
org.optaplanner.examples.curriculumcourse.domain.Lecture, class
org.optaplanner.examples.curriculumcourse.domain.Course]), it can not be
deducted automatically. at
org.optaplanner.core.config.constructionheuristic.placer.EntityPlacerConfig.deduceEntityDescriptor(EntityPlacerConfig.java:43)
I can't seem to figure out where the entitySelector is missing or what the
entityPlacer is used for or where it is configured. I have read that
multiple planning entities are possible, but can't determine how to get this
*simple* example to work.
- Second I tried to see if i could move the teacher planning variable to the
Lecture planningEntity, but cant figure out a way to keep all of the
lectures of one course stuck with the same teacher. I dont believe I can
change other planning entities on my own when one is updated.
I am still new to looking at these problems and determining the best model
to fit it, so hoping someone might have some tips/help on how to handle this
scenario.
Thanks in advanced,
--
View this message in context: http://drools.46999.n3.nabble.com/CurriculumCourse-extending-for-multiple...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years
Multiple rule violation
by Chaturvedi Dewashish
Hi,
I have a problem scenario.
I insert two facts
- obj1 (on which rules needs to be validated, used in when part),
- obj2 (to retrieve output, used in then part)
Let's say there are two rules Rule1 and Rule2 for this fact type and both of
them get violated. In this case I am getting only one instance of updated
obj2.
I need two instances of obj2 as both rules are violated. So, that I can
perform operation on based on those.
I have also seen on internet that DROOLS skips checking for other rules if
any one gets violated. So, requirement is as
1. DROOLS should check for all rules (What is performance cost for this.
Does fire all rules work this way?)
2. All instances of obj2 to perform actions accordingly (What is best way to
do this. Should I insert an array of this type? If so please, say how to
achieve this?)
Thanks and regards,
Chaturvedi Dewashish
Nirvana Solutions
Cell: +91-8373915350
11 years
Optaplanner rule to assign employee only to shift when he/she has the skills
by ns
I am trying to create a rule that adds a hard constraint when an employee
gets assigned to a shift for which he does not have the skills.
I have created a table in MySQL that assigns an employee to a certain
shiftType. In my code I stated that once an employee is assigned to a
shiftType, he or she automatically has the skills needed for that shiftType,
hence the skill == $shiftType part in the rule.
rule "alternativeSkill"
when
$assignment : ShiftAssignment($employee : employee, $shiftType :
shiftType)
not SkillProficiency(employee == $employee, skill == $shiftType)
then
scoreHolder.addHardConstraintMatch(kcontext, -1);
end
With the above rule employees still get assigned to shifts they do not have
the skill for. What is wrong with this rule? Thanks.
Kind regards,
Nick
--
View this message in context: http://drools.46999.n3.nabble.com/Optaplanner-rule-to-assign-employee-onl...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years