GSOC project - Realtime Collaborative Editor for Drools Decision Tables using Errai OT/EC
by Mark Proctor
Errai has recently added OTEC support, which is a web based system for collaborative editing. I thought this would be really interesting project, working on cutting edge web technologies for anyone doing a GSOC submission. Or actually anyone looking for an engaging task :)
https://community.jboss.org/wiki/GSOC13Ideas#Realtime_Collaborative_Edito...
Errai OTEC (Operationaly Transformed, Eventually Consistent Data Syncrhonization) facilitates builing Google Wave and Google Docs type applications, with multiple authors in real time on the same document. Two videos showing OTEC editing working in real time for collaboritive authoring:
https://www.youtube.com/watch?v=ChCasRr0cZc
https://www.youtube.com/watch?v=Wvf5pbOM920
Drools has extensive Decision Table support, which provides a spreadsheet like authoring tool for rules. Errai OTEC can allow two authors to work on the document at the same time. It would provide the following features:
-Current cursor/edit location for each user in the document.
-Edits to Cells to appear as they happen.
-Cell locking, so only one Cell can be updated by one user at a time.
Knowledge prerequisite:
Java, GWT, Errai
Skill level: Medium
Contact(s): Michael Anstis
Mentor(s): Michael Anstis
Associated project(s): Drools, Guvnor, Errai
Notes:
12 years, 10 months
"drools" key word
by rjr201
I was looking for a way to get a rule's name within the 'then' condition of
the rule.. found an old post on another forum that recommended this (which
works):
drools.getRule().getName()
My question is, what is this 'drools' keyword? could anyone point me to
documentation that outlines what else can be done with it.
Thanks in advance.
Rich.
--
View this message in context: http://drools.46999.n3.nabble.com/drools-key-word-tp4023662.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Re: [rules-users] Some Puzzles in planner
by ge0ffrey
erere121 wrote
> Hello every one ,I study the drool.plannar recently and both tried the
> planner 5.5 and planner 6.0(optaplanner) to solve my problem. I found
> something puzzles:
>
> 1 Is there any big difference between planner 5.5 and planner 6.0. I run
> the same process in both planner 5.5 and planner 6.0 with the same config,
> I find planner 5.5 gives the solution with 19hard broken while planner 6.0
> give the solution with 502hard broken !!!!! I am not sure why it happens.
>
> 2 When I open the demo in optaplanner in eclipse, I find every
> "scoreHolder.addConstraintMatch(....);" have the error like this:The
> method addConstraintMatch(kcontext,..) in the type SimpleScoreHolder is
> not applicable for the arguments (RuleContext, int)", can anybody help me.
>
> 3 The problem has a solution which breaks no rules while both planner 5.5
> and 6.0 never found it using the tabu search and hill climb search. I
> wonder is it right or is there any other global search method in planner.
1. That should not happen. Turn on enviromentMode FAST_ASSERT to validate
you don't have any score corruption.
2. Sounds like your eclipse is using the wrong optaplanner-core jar on it's
classpath to compile
3. It could be that there's no feasible solution (= 0 hard constraints
broken) to your solution, but I 'd only start believing this if
environmentMode doesn't find any score corruption. If it's a really tiny
problem, you can use the configuration <bruteForce> to be 100% sure. (Note:
Tabu search currently doesn't automatically scale down to tiny problems (=
less than 10 planning entities), you have to manually lower the
planingEntityTabu configuration setting.
--
View this message in context: http://drools.46999.n3.nabble.com/Some-Puzzles-in-planner-tp4023580p40236...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
[Planner]
by Mats Norén
Hi,
I've got a really simple problem that I can't seem to fix. :-)
I'm trying to use a simplified model for a room planning problem.
The planning entity is a Topic and the planning variables are Room and
TimeSlot.
A Person is tied to a Topic as a moderator.
Each Person can have multiple Topics as an interest.
The hard constraints are that a Person cannot be moderator in two Topics at
the same TimeSlot and that there cannot be multiple Topics in the same Room
at the same TimeSlot.
rule "conflictingModeratorInSameTimeslot"
when
$leftTopic : Topic($leftId : id, $leftTimeslot : timeSlot, timeSlot
!= null, $leftModerator: moderator)
$rightTopic : Topic(timeSlot == $leftTimeslot, moderator ==
$leftModerator, id > $leftId)
then
scoreHolder.addHardConstraintMatch(kcontext, -1);
end
rule "multipleTopicsInSameRoomAndTimeslot"
when
$leftTopic : Topic($leftId : id, $leftTimeslot : timeSlot, timeSlot
!= null, $leftRoom: room)
$rightTopic : Topic(timeSlot == $leftTimeslot, room == $leftRoom,
id > $leftId)
then
scoreHolder.addHardConstraintMatch(kcontext, -1);
end
The soft constraint that I have a problem with is that a Person has
multiple Topics as interests and I would like to penalize the Solution with
the number of Topics in the Persons interests collection with the number of
Topics that are allocated at the same TimeSlot.
Any ideas on how to go about this?
Regards,
Mats
12 years, 10 months
Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg
by Roger Swanson
I also had an issue at one point where the agent detected new knowledge but it didn't seem to load within the current knowledge base. I was able to fix it via the agent config:
KnowledgeAgentConfiguration agentConfig = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
agentConfig.setProperty("drools.agent.newInstance", "false");
KnowledgeAgent agent = KnowledgeAgentFactory.newKnowledgeAgent("myagent", agentConfig);
-----Original Message-----
From: riri [mailto:irina.adam@gmail.com]
Sent: Wednesday, May 01, 2013 6:25 AM
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] KnowledgeAgent to update knowledge base built with Guvnor pkg
Nobody has any ideas on how to solve this? I am willing to try anything that might work short of re-creating the knowledge base everytime I start a new session.
And when using the changeSet() method for the knowledge agent, how would one set the knowledge base properties? Like functioning in STREAM mode and not CLOUD.
Please, anyone, I really need your help.
--
View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgent-to-update-knowledge-base...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Is there a way to add a JAR to a knowledBuilder
by Charles Moulliard
Hi,
Is there a way to add a JAR to a knowledgeBuilder with a method like that ?
kbuilder.add(ResourceFactory.newUrlResource("file:///model-1.0-SNAPSHOT.jar"),ResourceType.JAR);
Regard,
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
12 years, 10 months
Drools Guvnor - Testing rules
by Alan
Hi guys,
I'm validating some features of Drools Guvnor and I would like to have some
directions.
We've got a project that has a lot of rules(its not on drools already, but
we pretend to migrate it) and we would like to use Drools Guvnor to host
those rules and run some analysis on it.
I've seen some features but it still not clear, so I will list my doubts and
you can say, ok it does or no it doesn't do it.
*Do drools guvnor validate missing ends on rules? Ex: when age > 15 and sex
== 'F' then Y();(note that it doesn't cover age <= 15)
*Do it validate/find infinite loops?
*Do it validate duplicate cases?(ex: when age > 15 then Y(); when age > 14
then Y();)
Is there some resource (documentation) that covers what cases drools guvnor
can handle on rules validation?
Also, is there some more examples(projects) to deploy on Guvnor to test and
have some fun?
Thanks a lot,
Alan Araya
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-Testing-rules-tp4023594.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
getWorkingMemoryEntryPoint returns null - two rules with same name
by ScalaEnthusiast
All,
I was getting a null returned when requesting an entrypoint using
getWorkingMemoryEntryPoint("myEntryPoint") in BRMS 5.3.1 (Drools 5.3). To be
clear "myEntryPoint" is an entry point defined in my technical rule.
What was causing my issue was that there were two rules of the same name
(cut-n-paste error), one with the entry-point and one without. As soon as I
changed the name of one of the rules, I no longer received the null pointer
error - I was able to get the entry point from the session.
I am posting this for others who may run into this [edge] case and to see if
this would be considered a bug. The package source shows that the rule
without the entry point came first and the one with the entry-point was
second. Not sure how the system handles loading rules but I wouldn't think
two rules with the same name should be allowed. Is this a validation issue
that Guvnor needs to deal with?
Any thoughts from those in the know?
Thanks,
ScalaEnthusiast
--
View this message in context: http://drools.46999.n3.nabble.com/getWorkingMemoryEntryPoint-returns-null...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
5.5.0-Final, persistence to MySQL
by Vytautas Gimbutas
Hello,
i'm having an issue with Drools 5.5.0-Final, stateful sessions and persistence to MySQL.
I have successfully configured and everything seems to work fine (session is persisted & updated to database), however
sometimes after i kill (not after each kill) and start again application I'm unable to load back session.
I get this exception when I try to load session:
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:115)
> at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:83)
> at org.drools.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(JPAKnowledgeService.java:131)
> at lt.mokejimai.ss.engine.Engine.getSession(Engine.java:57)
> at lt.mokejimai.ss.engine.Engine.insert(Engine.java:38)
> at lt.mokejimai.ss.api.rest.endpoint.InspectEndpoint.inspectTransactions(InspectEndpoint.java:61)
> 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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
> at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
> at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
> at org.eclipse.jetty.server.Server.handle(Server.java:349)
> at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
> at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)
> at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
> at java.lang.Thread.run(Thread.java:680)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:100)
> ... 45 more
> Caused by: java.lang.RuntimeException: Unable to load session snapshot
> at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:96)
> at org.drools.persistence.SingleSessionCommandService.initKsession(SingleSessionCommandService.java:253)
> at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:195)
> ... 50 more
> Caused by: java.lang.NullPointerException
> at org.drools.common.ConcurrentNodeMemories.getNodeMemory(ConcurrentNodeMemories.java:63)
> at org.drools.common.AbstractWorkingMemory.getNodeMemory(AbstractWorkingMemory.java:1034)
> at org.drools.rule.SlidingTimeWindow$BehaviorExpireWMAction.<init>(SlidingTimeWindow.java:460)
> at org.drools.marshalling.impl.PersisterHelper.deserializeWorkingMemoryAction(PersisterHelper.java:101)
> at org.drools.marshalling.impl.ProtobufInputMarshaller.readActionQueue(ProtobufInputMarshaller.java:426)
> at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:260)
> at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:158)
>> at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
>
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
> Hibernate: select sessioninf0_.id as id0_0_, sessioninf0_.lastModificationDate as lastModi2_0_0_, sessioninf0_.rulesByteArray as rulesByt3_0_0_, sessioninf0_.startDate as startDate0_0_, sessioninf0_.OPTLOCK as OPTLOCK0_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?
<…>
--
Vytautas Gimbutas
12 years, 10 months
Decision table -1 java file per rule - optimization
by jalex
Hi,
I noticed that each row in the decision table speadsheet is converted to a
separate java file during runtime (ex:
Rule_Pricing_bracket_352_941a618e0e72407d89d04664d5809e7f.java) . This will
lead to the number of classes increasing as the number of rules grow. Is
there a way to optimize such that all rules in 1 spreadsheet gets converted
to a single java file?
Sample logs during runtime, each "rule applied" log corresponds to firing
of a single row
04/29/2013 15:33:22,434 DEBUG [http-9080-1]
(Rule_Pricing_bracket_352_941a618e0e72407d89d04664d5809e7f.java:8)
aa410236-727c-4d48-8761-79088dca9b31 Rule applied: Default_A_rule40
04/29/2013 15:33:22,435 DEBUG [http-9080-1]
(Rule_Pricing_bracket_201_e2c74982a30d4e8eb128f07fbba73803.java:8)
aa410236-727c-4d48-8761-79088dca9b31 Rule applied: Default_B_rule40
04/29/2013 15:33:22,436 DEBUG [http-9080-1]
(Rule_Pricing_bracket_50_5de087aa5a3345adbc06748474dc53b3.java:8)
aa410236-727c-4d48-8761-79088dca9b31 Rule applied: Default_C_rule40
--
View this message in context: http://drools.46999.n3.nabble.com/Decision-table-1-java-file-per-rule-opt...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months