kie:module/kie:base Question
by mattmadhavan
Hello,
Seems like the only option I have for specifying mu.drl files is via package
nmae as follows:
is there anyway to specify individual .drl files instead of *packeages* ?
Something lke
<kie:kbase name="drl_kiesample3" source="classpath:rules/mydrl.drl">
Please note that I am trying to specify the actual .drl file.
I appreciate in advance!
Thanks
Matt
--
View this message in context: http://drools.46999.n3.nabble.com/kie-module-kie-base-Question-tp4030615....
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
Mocking Guvnor
by san_hegde
Hi ,
We have requirement where in during functional testing we do not want to connect to Guvnor rather want to mock it.
For example mocking could be like this.
We send Fact object as input during calling knowledgeSession.execute() method and in rule we update the result in that fact object itself. So here can we mock the output fact object, so that during functional testing we no need to connect to Guvnor rather mocked result fact object is returned.
Thank you
Santhosh Hegde A
--
View this message in context: http://drools.46999.n3.nabble.com/Mocking-Guvnor-tp4030601.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
Drools 5.6.0.Final PKG vs DRL infinite loop
by gboro54
We are using drools 5.6.0.Final and the same version of Guvnor. When we run
the source file of a package from Guvnor everything works as expected. When
we take the same rules and create a package we get stuck in an infinite loop
of rules firing(I have a listener logging every time a rule is
created/fired). Why would there be a difference if the rules don't change
between the source and the pkg?
We build the kbase as follows:
KnowledgeBuilderConfiguration config = KnowledgeBuilderFactory
.newKnowledgeBuilderConfiguration();
config.setOption(PropertySpecificOption.ALWAYS);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder(config);
for (ResourcePair pair : pairs) {
/* kbuilder.add(
ResourceFactory.newClassPathResource("rule-sets/2014/feb/"+pair.resourceName),
ResourceType.getResourceType(pair.resourceType));*/
kbuilder.add(
ResourceFactory.newClassPathResource(pair.resourceName),
ResourceType.getResourceType(pair.resourceType));
}
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if (errors.size() > 0) {
StringBuilder sb = new StringBuilder();
for (KnowledgeBuilderError error : errors) {
sb.append(error + "\n");
System.out.println(sb);
}
throw new IllegalArgumentException("Could not parse knowledge.
\n"
+ sb);
}
this.knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase();
this.knowledgeBase
.addKnowledgePackages(kbuilder.getKnowledgePackages());
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
Annotation @PropertyReactive not works
by davidmoros
I'm developing a system rules with drools, how any novice I found the problem
of infinite loops, in unitary test I resolved with annotation
@PropertyReactive and all works fine, until I uploaded my model and rules to
Guvnor.
Now I have developed a webservice that download the PKG from Guvnor, with
change-set and seems that the annotation @PropertyReactive not works because
of the same rule is reevaluated constantly although the consecuences the
rule not change the value of attributes of LHS of rule, and infinite loops
appears....
The error only occurs when I download the PKG from Guvnor, if I refer the
file DRL directly all woks fine
Can anybody help me?
I use 5.6.0.Final Version for Drools and Guvnor, Guvnor and my webservice
are deployed in Tomcat
Thanks in advance
--
View this message in context: http://drools.46999.n3.nabble.com/Annotation-PropertyReactive-not-works-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
.NET WCF unable to deserialize response from Drools Camel Server example 6.2.0 snapshot
by Clark Wilson
Drools, Eclipse, Tomcat, and WCF are all new to me, so I may be missing something obvious. Questions at the bottom, after the problem description.
I deployed the Drools Camel Server WAR file in a Tomcat 7 server I'm running within Eclipse under Windows 7. Using Visual Studio 2013 and System.ServiceModel 4.0.0.0 I generated a client from the WSDL. I fixed a problem with serialization and am getting an error on deserialization. The inner exception says "End element 'return' from namespace 'http://soap.jax.drools.org/' expected. Found text '<'. Line 1, position 189."
The WSDL (obtained from http://127.0.0.1:8080/drools-camel-server-example-6.2.0-SNAPSHOT/kservice... there should be a thing named "return" there.
<xsd:element name="executeResponse" type="tns:executeResponse"/>
<xsd:complexType name="executeResponse">
<xsd:sequence>
<xsd:element name="return" type="xsd:anyType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
I am unable to convince the Visual Studio debugger to show me the text it is trying to deserialize. But a colleague used another tool to get a copy of the message body and it seems in addition to "return" there is a "fact-handle". (This is the weak link in the evidence chain; I didn't redo this today.) (The "Hello:" text is what Drools is indeed sending. I changed the original drl file.)
<?xml version='1.0' encoding='UTF-8'?>
<execution-results>
<result identifier="person1">
<org.drools.server.Message><text>Hello:</text></org.drools.server.Message>
</result>
<fact-handle identifier="person1" external-form="0:1:427239608:427239608:1:DEFAULT:NON_TRAIT"/>
</execution-results>
Question1: Is the fact-handle element likely to be the cause of .NET's deserialization error?
Question 2: If so, what would I do, and where, to fix the problem? Does the WSDL need to be different? Does fact-handle need to be omitted? Does some .NET option need to be changed?
Question 3: If that's not the cause, how can I identify the real problem?
Thanks in advance,
Clark Wilson
11 years, 7 months
google groups
by Mark Proctor
We are in the final stages for the discussions on lists and forums. We are likely to move all lists to google groups, as it provides a unified email list and web forum. There will be three resulting groups, instead of the current two.
Drools Setup - installation, configuration, setup and administration
Drools Usage - authoring (drl, decision tables, score cards rule templates, scenarios) and running.
Drools Development - documentation and coding of the drools project
Theses current two lists will remain and the email address will continue to work for a while. We will attempt to auto-subscribe (i.e. transfer) all existing subscribers. rules-dev people will be subscribed to drools-development. rules-users will be subscribed to both drools-setup and drools-usage - as the current list currently covers both those topics.
If anyone has any feedback, please let us know.
Mark
11 years, 7 months
All Drools examples 6.x fail on Mvel dependency error
by mattmadhavan
Hello,
I have downloaded the new Drools 6.x distribution. All the example tests
fail (out of the box) with the following stacktrace.
*java.lang.NoClassDefFoundError: org/mvel2/ConversionHandler*
at
org.drools.compiler.rule.builder.DefaultConstraintBuilderFactory.<clinit>(DefaultConstraintBuilderFactory.java:6)
at
org.drools.compiler.rule.builder.DroolsCompilerComponentFactory.<init>(DroolsCompilerComponentFactory.java:11)
at
org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl.init(KnowledgeBuilderConfigurationImpl.java:238)
at
org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl.init(KnowledgeBuilderConfigurationImpl.java:188)
at
org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl.<init>(KnowledgeBuilderConfigurationImpl.java:153)
at
org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:178)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:386)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:346)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:498)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:469)
at
org.drools.example.api.namedkiesession.NamedKieSessionExample.go(NamedKieSessionExample.java:15)
at
org.drools.example.api.namedkiesession.NamedKieSessionExampleTest.testGo(NamedKieSessionExampleTest.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
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.mvel2.ConversionHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 35 more
--
View this message in context: http://drools.46999.n3.nabble.com/All-Drools-examples-6-x-fail-on-Mvel-de...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 7 months
RightTupleList NPE with 6.1.0.Final
by Matteo Mortari
Ciao,
I'm using 6.1.0.Final - btw, thank you for this release!
I have an issue as sometimes I'm getting an NPE from the RightTupleList, as
documented in the snippet of stacktrace below. Unfortunately, I'm not able
to provide as I did in the past a reproducer, because this error occurs
only occasionally after the application has been running for quite some
time - this error does not happen with the rule unit tests suite.
Therefore I would like to ask you the following questions, please.
1. would the stacktrace below be enough for you to possibly identify the
kind of error which is happening in this case?
2. shall I go ahead and raise a JIRA just with this information? I've
checked on JIRA but couldn't find any "similar" issue for this case
Finally, if the answers are both "no", does it mean that the only way I
could provide an helpful feedback, is to log all the session incoming facts
indefinitely, so to later "craft" an log-replay reproducer; or would you
suggest another way I can do this more efficiently?
Thank you very much in advance for your feedback
Ciao
Caused by: java.lang.NullPointerException
at
org.drools.core.util.index.RightTupleList.matches(RightTupleList.java:264)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.util.index.RightTupleIndexHashTable.get(RightTupleIndexHashTable.java:433)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.util.index.RightTupleIndexHashTable.getFirst(RightTupleIndexHashTable.java:114)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.reteoo.BetaNode.getFirstRightTuple(BetaNode.java:430)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:94)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:60)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:548)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:534)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:334)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.phreak.RuleExecutor.evaluateNetwork(RuleExecutor.java:77)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.common.DefaultAgenda.evaluateEagerList(DefaultAgenda.java:990)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:945)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1234)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1239)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1212)
[drools-core-6.1.0.Final.jar:6.1.0.Final]
at
(...).ChronologicalEngine.insertPolicyAdvanceInsertFire(ChronologicalEngine.java:381)
[classes:]
at (...).ChronologicalEngine.inject(ChronologicalEngine.java:284)
[classes:]
11 years, 7 months
Getting "401 This user has no permissions setup" after migrating to 5.3.3.Final from guvnor 5.1.1
by LaKhI ReDdY!!!!!!!!!!!
Hi All,
Recently i have upgraded to drools guvnor 5.3.3.Final from Gurvnor 5.1.1. I
have exported the data and imported in 5.3.3.Final.
I am able to login to the application using default login using but not
able to login using SSO and getting "401 This user has no permissions
setup".
Can anybody suggest what needs to be done to avoid this error?
Regards,
Lakshmi Reddy
11 years, 7 months