Drools 6.0.0.Final - importing rules from multiple maven projects
by Soumya.plavaga
We want to keep separate the client specific rules & common set of rules. We
have created two different maven projects. one project having the common
drls say 'A'. Another project having the client specific drls say 'B'. 'B'
having dependency on 'A'. We want to load the rules in run time. We have
tried the below approach -
Tried to retrieve the kieSession using release id of project 'B' and fired
all rules in that kieSession. But only the rules of project 'B' is getting
executed but the rules within project 'A' are not getting loaded.
What can be the possible approach to import rules from multiple projects.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Final-importing-rules-from...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
condition operator "||" give NPE in 6.0 but 5.x is fine
by wtang
I have a rule below and the "||" operator is giving me null pointer exception
(NPE) when the rule is invoked. This NPE problem is only happening is 6.0.
This NPE problem does not happen in 5.x and runs without and issues in 5.x
Is this a bug in Drools 6.0?
Below is my simple rule:
rule "rule using Map"
dialect "mvel"
when
$map: Map(
this["id"] == "1000" || // "||" operator works fine
in 5.x but gives NPE in 6.0
this["first"] == "Johna"
)
then
System.out.println("customer is: " + $map["first"] + " " +
$map["last"]);
end
Please let me know if this is a bug in 6.0x. thanks!
--
View this message in context: http://drools.46999.n3.nabble.com/condition-operator-give-NPE-in-6-0-but-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
Driving License application
by seyfullah
Hello,
I am trying to implement Driving License example application in Drools
Documentation Versio 6.0.0.0 Final.
My main method is as below.
KieServices kieServices = KieServices.Factory.get();
KieContainer kContainer = kieServices.getKieClasspathContainer();
StatelessKieSession kSession = kContainer.newStatelessKieSession();
Applicant applicant = new Applicant("Mr John Smith", 16);
assertTrue( applicant.isValid() );
kSession.execute( applicant ) ;
assertFalse ( applicant.isValid() );
My licenseApplication.drl file is as below:
package MyPackage
import MyPackage.Applicant;
rule "Is of valid age"
when
$a : Applicant( age < 18 )
then
$a.setValid ( false );
end
Thanks to assertTrue and asserFalse methods, its output is
It is false as not expected
It is false as expected
Bu when I change age parameter from 16 to 22 its output is same again. I
expected that it is true.
I think there is something wrong.
Do you have any idea about this problem?
Regards
--
View this message in context: http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project
by jguenth
I'm trying to upload a maven jar artifact using the Artifact Repository and
getting the parse error below.
Here is my maven project structure...
parent_pom (packaging: pom)
|_module1_parent_pom (packaging: pom)
| |_module1a (packaging: jar)
| |_module1b (packaging: jar)
| |_module1c (packaging: jar)
|_module2_parent_pom (packaging: pom)
|_module2a (packaging: jar)
|_module2b (packaging: jar)
|_module2c (packaging: jar)
For example, I'm trying to upload the module1a jar. This project is built
using Apache Maven 3.0.4. Is this type of multi-module project supported in
kie-wb 6.0.0?
Dec 17, 2013 11:27:56 AM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet [M2RepoFileServlet] in context with
path [/kie-drools-wb] threw exception
java.lang.RuntimeException: Unable to parse File 'pom.xml'
at
org.drools.compiler.kproject.xml.MinimalPomParser.parse(MinimalPomParser.java:44)
at org.drools.compiler.kproject.xml.PomModel$Parser.parse(PomModel.java:65)
at
org.guvnor.m2repo.backend.server.FileServlet.uploadFile(FileServlet.java:154)
at
org.guvnor.m2repo.backend.server.FileServlet.processUpload(FileServlet.java:84)
at org.guvnor.m2repo.backend.server.FileServlet.doPost(FileServlet.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.kie.integration.tomcat.JACCValve.invoke(JACCValve.java:93)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.xml.sax.SAXParseException; Premature end of file.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at
org.drools.compiler.kproject.xml.MinimalPomParser.parse(MinimalPomParser.java:42)
... 36 more
--
View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-ma...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
separating .drl declare type from actual .drl rule into each own file
by wtang
I have a .drl rule file with many declare in it to define my own types. I
compile this file every time. I want to separate the declare types out of
its own file since the types don't change and just leave the rules in the
original .drl file.
I create my own declares.drl and pulled all the declare from the rule.drl
file and inside the rule.drl file I just did import. While my declares.drl
file compile with no errors, I am getting types not resolve error from my
.drl file event thought I have the import.
Does drool support the separation of types into its own file and rule file
just refer to those declared types?
--
View this message in context: http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months