guvnor 5.5 - Guided decision tables (web based)
by Apurva Joshi
Hi,
I am trying to create a rule using Guided decision tables (web based).How
can I use any of the collection classes in my rule?I know that we have to
first import the model POJO jar in order to use the class types in our
rule.when I try to upload JDK jar(rt.jar),which contain implementation for
the collection classes and try to validate it,the guvnor tool gives me error
that the POJO jar is not valid.
I would appreciate any help of this issue.
--
View this message in context: http://drools.46999.n3.nabble.com/guvnor-5-5-Guided-decision-tables-web-b...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months
Mapping to '==' in enumeration
by rjr201
Hi,
I've created an enumeration in Guvnor like so:
'Object.operator[]': ['== = equals', '!= = does not equal', '< = less than',
'> = greater than']
The less than and greater than map fine. But the equals and does not equal
don't. I realise that I need to escape the first two = signs, but can't find
a way to do it.
'\=\= = equals' doesn't work. Anyone got any ideas?
Sorry if this is something really easy to solve, but I can't work it out.
(also I realise that I could just have a drop down box with the mathematical
symbols in and not worry about mapping it to english, but apparently that
would be too technical for non-technical users )
--
View this message in context: http://drools.46999.n3.nabble.com/Mapping-to-in-enumeration-tp4022245.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months
Unmarshall large session fails
by Magnus Vojbacke
I'm trying to unmarshal a knowledge session that has been persisted to file, but I get the following exception:
Stack Trace:
com.google.protobuf.InvalidProtocolBufferException: Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.
at com.google.protobuf.InvalidProtocolBufferException.sizeLimitExceeded:89
at com.google.protobuf.CodedInputStream.refillBuffer:720
at com.google.protobuf.CodedInputStream.isAtEnd:666
at com.google.protobuf.CodedInputStream.readTag:99
at org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom:967
at org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom:773
at com.google.protobuf.AbstractMessageLite$Builder.mergeFrom:212
at com.google.protobuf.AbstractMessage$Builder.mergeFrom:746
at org.drools.marshalling.impl.ProtobufMessages$Header.parseFrom:724
at org.drools.marshalling.impl.PersisterHelper.readFromStreamWithHeader:234
at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession:217
at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession:107
at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall:143
The session consists of >1M facts, and the file is ~167 MB in size.
While Googling, I stumbled upon the recommendation to run CodedInputStream.resetSizeCounter() inbetween deserializing messages. Is this a fix that could be implemented in Drools?
Is there any way of configuring or parameterizing the unmarshalling size limit used by Drools?
13 years, 4 months
Planner: What is a good example/algo to chain entities?
by Michiel Vermandel
Hi,
I need to keep some Planning entities (Tasks) together and I am looking for some insights/ideas/examples in how to tackle this.
Tasks are grouped by a groupId (Groups are problem facts).
The Tasks do not have to be grouped like a pillar but more like an accordion.
One of the planning variables is "Period", a Period typically is 3 weeks and we have 12 Periods to plan the tasks into.
The requirement is that all tasks within a group need to be kept together in such a way that:
- the spread (nr of periods) of the tasks is minimal
- the spread is never more than the sum of the duration of the separate tasks in the group.
So given a group of 3 tasks:
1)This is good:
Period 12345789ABC
T1: xxx
T2: xx
T3: x
2)This is better:
Period 12345789ABC
T1: xxx
T2: xx
T3: x
3)This is (one of) the best:
Period 12345789ABC
T1: xxx
T2: xx
T3: x
4)This is bad:
Period 12345789ABC
T1: xxx
T2: xx
T3: x
Of course 3 is favorite, but maybe not possible due to other planning variables (-> availability of people to execute the tasks).
I need to plan a few hundred of such groups of tasks which all share the same Period space and list of available people.
(A person can only do one task per period)
I have got the DRL rule that keeps the tasks together (rule counts the gaps) , but giving penalty for making gaps (by shifting a single task) makes it hard to find a good solution.
What would be the best approach to solve this problem?
- A combination of custom mover and swapper which moves/swaps groups instead of single tasks?
- The above in combination with a group shuffle factory (swapping tasks in a single group)?
Other ideas?
Thanks a lot!
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
13 years, 4 months
DSL Bug?
by rjr201
I've had the following problem when creating a DSL. Not sure if it's a bug,
but it confused me for a good 40 minutes so thought I'd mention it here in
case others have the same problem..
If I create a DSL like this:
[when]There is a fact {fact_name}{fact_label}={fact_label}:{fact_name}()
And create a rule in the guided editor that has Object as the {fact_name}
and $obj as the {fact_label} I get:
1. | rule "rule"
2. | dialect "mvel"
3. | when
4. | Object$obj:()
5. | then
6. | end
as the source.
At first I thought it was to do with putting quotation marks around the
{}'s. But I've since found that if I put a space between {fact_name} and
{fact_label} I get the expected result of:
1. | rule "rule"
2. | dialect "mvel"
3. | when
4. | $obj:Object()
5. | then
6. | end
Again, sorry if this is down to my limited understanding of DSLs. Any
further insights into why this happens or any other quirks of DSLs would be
greatly appreciated as I'm going to be spending a lot of time with them in
the not too distant future..
Rich.
--
View this message in context: http://drools.46999.n3.nabble.com/DSL-Bug-tp4022209.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months
DroolsServiceImplementation - from examples
by MaverickDrools
Hi,
Trying to run the startServers() test at:
https://github.com/droolsjbpm/guvnor/blob/5.5.x/guvnor-webapp-drools/src/...
which gives me an exception:
java.lang.NoClassDefFoundError:
Lorg/drools/guvnor/server/DroolsServiceImplementation;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredFields(Class.java:1743)
at org.junit.runners.model.TestClass.<init>(TestClass.java:40)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:65)
at
org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:59)
at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:50)
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.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
at
org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException:
org.drools.guvnor.server.DroolsServiceImplementation
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 25 more
I'm guessing I need to add a dependency in the pom file to get the
implementation of this class.
org.drools / guvnor-webapp-drools / 5.5.0.Beta1 is a WAR artifact and so
org.drools.guvnor.server.DroolsServiceImplementation resides within a WAR
file. How can I make it accessible to the JUnit that I'm trying to execute?
Thanks,
Aseem
--
View this message in context: http://drools.46999.n3.nabble.com/DroolsServiceImplementation-from-exampl...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 4 months