Semantic Web Drools Module, Request for Feedbak
by Xavier Breton
Hi,
I'm looking for feedback, I'll develop a Semantic Web Drools Module that
will be the subject of my Master Degree Tesis.
The idea is to use Eclipse Modelling Framework (EMF) for prototyping and
follow a Model Driven Architecture (MDA) where the source language is
Semantic of Business Vocabularies and Business Rules (SBVR) and the target
language is Drools DRL.
The mapping could be (PIM level):
- Semantic Web Rule Language (SWRL)
- Ontology Web Language (OWL)
- RuleML
- Rule Interchange Format (RIF)
- REWERSE Rule Markup Language (R2ML)
It could be added to the module at the source UML or Entity Relationship
like models to transform the models into SBVR.
Regards
Xavier Breton
10 years, 10 months
IMPORTANT: git merges
by Edson Tirelli
All,
We noticed lately that an increasing number of git merges is happening
in the Drools/jBPM codebase. Git merges can be easily identified in the
"network" graph in github repo, or by using any other Git client tool, as
parallel lines in the branch history. E.g.:
https://github.com/droolsjbpm/droolsjbpm-knowledge/network
Please note that each and every merge, while not a big problem by
itself, increases the risk of overriding code changes (i.e., losing code)
as well as increases future maintenance cost. If you want know more about
it, feel free to ask, or just trust me on this... :)
Git offers an alternative to merges in the form of "rebase". Rebase
enables developers to commit code on top of the most recent change in the
branch, instead of in parallel to it. It guarantees no code will be lost
when doing that, and makes it easier to maintain code in the future. If you
don't know how to rebase code, please read one of the many git
books/documentation available on line, like:
http://git-scm.com/book
Also feel free to ask and I will be happy to help.
There is just one case where rebase can not be used:
* You should NEVER rebase a commit that was published to a public
repository before.
Also, the github pull request "merge" button uses merge instead of
rebase. While it is very quick and easy for a developer to click on that
button, please note that it introduces merges, and at the same time commits
code that was not tested by the person doing the merge. It is acceptable
for small code fixes, but for anything larger than a few lines of code
changes, you should pull the changes into your machine rebasing them, run
the tests to make sure they are still clean and only after that push the PR
changes to the public repo.
Please be aware of that and try to minimize merges by using rebase
whenever possible.
Thanks,
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
11 years, 7 months
How to move to Kie from Knwoledge ??
by Charles Moulliard
Hi,
I have some difficulties to figure out How I could achieve the same as we
did in the past using "changeset.xml" & Knowledge API classes but now with
Kie :
Code is here : https://gist.github.com/cmoulliard/797426c106a53028ebdd
Help is welcome :
OLD WHICH IS WORKING
KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("changeset.xml",
getClass()),
ResourceType.CHANGE_SET);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
StatefulKnowledgeSession kSession =
createKnowledgeSession(kbase);
NEW CODE (DOES NOT WORK - packages = null)
KieServices ks = KieServices.Factory.get();
KieFileSystem kfs = ks.newKieFileSystem();
Resource res =
ResourceFactory.newClassPathResource("changeset.xml",getClass())
.setResourceType(ResourceType.CHANGE_SET);
kfs.write(res);
KieBuilder kbi = ks.newKieBuilder(kfs).buildAll();
// Create Session
KieSession kse =
ks.newKieContainer(ks.getRepository().getDefaultReleaseId()).newKieSession();
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
-Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ
IDEA 12.app/bin" -Dfile.encoding=UTF-8 -classpath
"/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/deploy.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/dt.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/javaws.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jconsole.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/management-agent.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/plugin.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/sa-jdi.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Users/chmoulli/wks-client-projects/astrium/guvnor-rest/target/classes:/Users/chmoulli/.m2/repository/org/kie/kie-api/6.0.0-SNAPSHOT/kie-api-6.0.0-SNAPSHOT.jar:/Users/chmoulli/.m2/repository/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar:/Users/chmoulli/.m2/repository/org/kie/kie-internal/6.0.0-SNAPSHOT/kie-internal-6.0.0-SNAPSHOT.jar:/Users/chmoulli/.m2/repository/org/drools/drools-core/6.0.0-SNAPSHOT/drools-core-6.0.0-SNAPSHOT.jar:/Users/chmoulli/.m2/repository/org/mvel/mvel2/2.1.4.Final/mvel2-2.1.4.Final.jar:/Users/chmoulli/.m2/repository/org/drools/drools-compiler/6.0.0-SNAPSHOT/drools-compiler-6.0.0-SNAPSHOT.jar:/Users/chmoulli/.m2/repository/org/antlr/antlr-runtime/3.3/antlr-runtime-3.3.jar:/Users/chmoulli/.m2/repository/org/antlr/antlr/3.3/antlr-3.3.jar:/Users/chmoulli/.m2/repository/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar:/Users/chmoulli/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/Users/chmoulli/.m2/repository/org/eclipse/jdt/core/compiler/ecj/3.5.1/ecj-3.5.1.jar:/Users/chmoulli/.m2/repository/com/thoughtworks/xstream/xstream/1.4.3/xstream-1.4.3.jar:/Users/chmoulli/.m2/repository/xmlpull/xmlpull/
1.1.3.1/xmlpull-1.1.3.1.jar:/Users/chmoulli/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar:/Users/chmoulli/.m2/repository/org/drools/drools-spring/6.0.0-SNAPSHOT/drools-spring-6.0.0-SNAPSHOT.jar:/Users/chmoulli/.m2/repository/org/drools/drools-decisiontables/6.0.0-SNAPSHOT/drools-decisiontables-6.0.0-SNAPSHOT.jar:/Users/chmoulli/.m2/repository/org/drools/drools-templates/6.0.0-SNAPSHOT/drools-templates-6.0.0-SNAPSHOT.jar:/Users/chmoulli/.m2/repository/org/apache/poi/poi-ooxml/3.9/poi-ooxml-3.9.jar:/Users/chmoulli/.m2/repository/org/apache/poi/poi/3.9/poi-3.9.jar:/Users/chmoulli/.m2/repository/commons-codec/commons-codec/1.5/commons-codec-1.5.jar:/Users/chmoulli/.m2/repository/org/apache/poi/poi-ooxml-schemas/3.9/poi-ooxml-schemas-3.9.jar:/Users/chmoulli/.m2/repository/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar:/Users/chmoulli/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/Users/chmoulli/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/chmoulli/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/Users/chmoulli/.m2/repository/org/springframework/spring-core/3.0.6.RELEASE/spring-core-3.0.6.RELEASE.jar:/Users/chmoulli/.m2/repository/org/springframework/spring-asm/3.0.6.RELEASE/spring-asm-3.0.6.RELEASE.jar:/Users/chmoulli/.m2/repository/org/springframework/spring-beans/3.0.6.RELEASE/spring-beans-3.0.6.RELEASE.jar:/Users/chmoulli/.m2/repository/org/springframework/spring-context/3.0.6.RELEASE/spring-context-3.0.6.RELEASE.jar:/Users/chmoulli/.m2/repository/org/springframework/spring-aop/3.0.6.RELEASE/spring-aop-3.0.6.RELEASE.jar:/Users/chmoulli/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/chmoulli/.m2/repository/org/springframework/spring-expression/3.0.6.RELEASE/spring-expression-3.0.6.RELEASE.jar:/Users/chmoulli/.m2/repository/javax/javaee-api/6.0/javaee-api-6.0.jar:/Users/chmoulli/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/chmoulli/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/chmoulli/.m2/repository/org/osgi/org.osgi.core/4.3.0/org.osgi.core-4.3.0.jar:/Users/chmoulli/.m2/repository/junit/junit/4.9/junit-4.9.jar:/Users/chmoulli/.m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar:/Users/chmoulli/.m2/repository/org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.jar:/Users/chmoulli/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Applications/IntelliJIDEA
12.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain
org.fusesource.demo.main.MainApp4
2013-04-25 09:33:41 WARN AbstractKieModule:182 - No files found for
KieBase defaultKieBase
2013-04-25 09:33:41 INFO KieRepositoryImpl:62 - KieModule was
added:MemoryKieModule[ ReleaseId=org.default:artifact:1.0.0-SNAPSHOT]
Exception in thread "main" java.lang.NullPointerException
2013-04-25 09:33:42 INFO MainApp4:59 - >> FactTypes created for
LoanApplication, Applicant, IncomeSource
at org.fusesource.demo.main.MainApp4$Knowledge.build(MainApp4.java:61)
at org.fusesource.demo.main.MainApp4.main(MainApp4.java:23)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Regards,
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
11 years, 8 months
projects failed on Jenkins
by Michael Biarnes Kiefer
Hi,
looking at Jenkins I see that following projects don't compile:
droolsjbpm-build-bootstrap - FAILED
jbpm - UNSTABLE
jbpm-designer - UNSTABLE
kie-ide - FAILED
optaplanner - executing right now, last status FAILED
All other projects for the release are correct and executed successfully.
Could you please have a look at this and fix this, before tomorrow at 24:00 h [CET]
I downloaded [git-pull] all prjects with the latest changes and did a mvn clear install -Dfull -DskipTests locally
and everything builds correctly
On Jenkins it doesn't execute the build succesfully.
Thank you
Michael
11 years, 8 months
error in 6.0.0.Beta2
by Anton Hughes
Hi Drools devs
FYI
When running guvnor I get the following error. I am simply trying to open
the Dummy Rule.drl.
3:58:47,984 ERROR [stderr] (http--127.0.0.1-8080-5) Message:
CommandType=loadContent:org.uberfire.backend.vfs.Path:,
ErrorTo=org.kie.guvnor.drltext.service.DRLTextEditorService:RPC.loadContent:org.uberfire.backend.vfs.Path::Errors:120,
ReplyTo=org.kie.guvnor.drltext.service.DRLTextEditorService:RPC.loadContent:org.uberfire.backend.vfs.Path::RespondTo:120,
ToSubject=org.kie.guvnor.drltext.service.DRLTextEditorService:RPC,
MethodParms=[PathImpl{uri='default://master@uf-playground/mortgages/src/main/resources/Dummy%20rule.drl',
fileName='Dummy rule.drl',
attrs={lastModifiedTime=org.kie.commons.java.nio.base.FileTimeImpl@641efadf,
isDirectory=false, isRegularFile=true,
creationTime=org.kie.commons.java.nio.base.FileTimeImpl@2de879d3, size=79}}]
13:58:48,011 ERROR [stderr] (http--127.0.0.1-8080-5) errorMessage: Error
calling remote service:
org.kie.guvnor.drltext.service.DRLTextEditorService:RPC
13:58:48,017 ERROR [stderr] (http--127.0.0.1-8080-5) exception:
org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking
endpoint
13:58:48,022 ERROR [stderr] (http--127.0.0.1-8080-5) disconnect: false
13:58:48,026 ERROR [stderr] (http--127.0.0.1-8080-5)
org.jboss.errai.marshalling.client.api.exceptions.MarshallingException:
class is not available to the marshaller framework:
java.lang.NoClassDefFoundError
13:58:48,033 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.marshalling.server.MappingContextSingleton$4.getMarshaller(MappingContextSingleton.java:283)
13:58:48,039 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.marshalling.client.api.AbstractMarshallingSession.getMarshallerInstance(AbstractMarshallingSession.java:67)
13:58:48,046 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.marshalling.client.util.MarshallUtil.getMarshaller(MarshallUtil.java:125)
13:58:48,051 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.marshalling.client.marshallers.ErraiProtocolEnvelopeMarshaller.marshall(ErraiProtocolEnvelopeMarshaller.java:97)
13:58:48,058 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.marshalling.client.protocols.ErraiProtocol.encodePayload(ErraiProtocol.java:40)
13:58:48,063 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.marshalling.server.protocol.ErraiProtocolServer.encodePayloadToByteArrayInputStream(ErraiProtocolServer.java:31)
13:58:48,070 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.io.BufferHelper.encodeAndWrite(BufferHelper.java:70)
13:58:48,075 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.MessageQueueImpl.offer(MessageQueueImpl.java:186)
13:58:48,080 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.ServerMessageBusImpl.enqueueForDelivery(ServerMessageBusImpl.java:739)
13:58:48,085 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:728)
13:58:48,091 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:675)
13:58:48,096 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.client.api.base.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:228)
13:58:48,102 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.client.api.base.DefaultMessageBuilder$1.sendNowWith(DefaultMessageBuilder.java:78)
13:58:48,108 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:107)
13:58:48,113 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:77)
13:58:48,117 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.client.util.ErrorHelper.handleMessageDeliveryFailure(ErrorHelper.java:170)
13:58:48,125 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:53)
13:58:48,132 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:93)
13:58:48,141 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:107)
13:58:48,145 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:117)
13:58:48,151 ERROR [stderr] (http--127.0.0.1-8080-5) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
13:58:48,155 ERROR [stderr] (http--127.0.0.1-8080-5) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
13:58:48,160 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
13:58:48,166 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
13:58:48,171 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
13:58:48,176 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
13:58:48,182 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
13:58:48,187 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:221)
13:58:48,192 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
13:58:48,198 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
13:58:48,203 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
13:58:48,208 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
13:58:48,213 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
13:58:48,218 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
13:58:48,223 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
13:58:48,228 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
13:58:48,233 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
13:58:48,239 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
13:58:48,245 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
13:58:48,251 ERROR [stderr] (http--127.0.0.1-8080-5) at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
13:58:48,256 ERROR [stderr] (http--127.0.0.1-8080-5) at
java.lang.Thread.run(Thread.java:722)
11 years, 8 months
Re: [rules-dev] [jbpm-dev] release 6.0.0.Beta2
by Michael Anstis
Yes, I'd expect 6.0.0 Beta2 to be available at
http://www.jboss.org/drools/downloads.
On 23 April 2013 05:19, Jeffrey DeLong <jdelong(a)redhat.com> wrote:
> MIke,
>
> Can we expect to see 6.0.0Beta 2 on the drool project site under downloads?
>
> Thanks,
>
> Jeff
> Jeffrey DeLong
> Manager
> Global Partner Enablement
> Red Hat (www.redhat.com)
> cell: 801.554.4185
>
>
>
> On Apr 22, 2013, at 4:36 AM, Michael Anstis wrote:
>
> I have changed the Errai version in UberFire and
> droolsjbpm-build-bootstrap from 2.3.0-SNAPSHOT to 2.3.0.Final (dated 19th
> April 2013).
>
> With kind regards,
>
> Mike
>
>
> On 19 April 2013 12:37, Michael Biarnes Kiefer <mbiarnes(a)redhat.com>wrote:
>
>> Hello everyone,
>>
>> We have planned the next realease 6.0.0.Beta2 for the 26th April (Friday
>> next week).
>> I ask you to push all commits that have to go into this release until
>> 24th April (Wednesday) evening (24.00 CET).
>> Everything what is not pushed on the "masters" of your projects will not
>> be taken into account for this release.
>>
>> To ensure a smooth release process I ask you to check if your projects
>> build on Jenkins. If they don't please
>> do the necessary changes and fix them.
>>
>> Here is the actual list [repository-list.txt] with all included projects
>> for the release, and I hope it is up to date:
>>
>> droolsjbpm-build-bootstrap
>> droolsjbpm-knowledge
>> kie-commons
>> drools
>> optaplanner
>> jbpm
>> droolsjbpm-integration
>> uberfire
>> guvnor
>> droolsjbpm-tools
>> droolsjbpm-build-distribution
>> jbpm-designer
>> jbpm-console-ng
>> kie-ide
>> dashboard-builder
>>
>>
>>
>> Thank you very much
>>
>>
>>
>> Michael
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> jbpm-dev mailing list
>> jbpm-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jbpm-dev
>>
>
> _______________________________________________
> jbpm-dev mailing list
> jbpm-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbpm-dev
>
>
>
11 years, 8 months
Question : Issue with getKieModule(ReleaseId releaseId, byte[] pomXml)
by Charles Moulliard
Hi,
With new Kie API, the way that we build KieBuilder, Session, KieBase is a
bit different as we did before.
We can now create a KieFileSystem, add resources (drl, ....) and create a
KieBuilder from the KieSystem
KieFileSystem kfs = kieServices.newKieFileSystem()
.write("src/main/resources/temp.drl", packages)
.writeKModuleXML(createKieProjectWithPackages(kieServices).toXML());
kieBuilder = kieServices.newKieBuilder(kfs).buildAll();
That works fine for Java standalone projects (or in a JEE container or Web
Container (Tomcat, Jetty) - I hope ?) but not in a OSGI environment.
In consequence the following step fails in my code :
kieServices.newKieContainer(kieServices.getRepository().getDefaultReleaseId()).newKieSession();
Caused by: java.lang.RuntimeException: Cannot find KieModule:
org.default:artifact:1.0.0-SNAPSHOT
at
org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:75)
as getKieModule(ReleaseId releaseId, byte[] pomXml) return null
The following code should be imporved as until now we don't check classpath
public KieModule getKieModule(ReleaseId releaseId, byte[] pomXml) {
VersionRange versionRange = new
VersionRange(releaseId.getVersion());
KieModule kieModule = kieModuleRepo.load(releaseId, versionRange);
if ( kieModule == null ) {
log.debug( "KieModule Lookup. ReleaseId {} was not in cache,
checking classpath",
releaseId.toExternalForm() );
kieModule = checkClasspathForKieModule(releaseId);
}
if ( kieModule == null ) {
log.debug( "KieModule Lookup. ReleaseId {} was not in cache,
checking maven repository",
releaseId.toExternalForm() );
kieModule =
loadKieModuleFromMavenRepo
loadKieModuleFromMavenRepo(releaseId, pomXml);
}
return kieModule;
}
and loadKieModuleFromMavenRepo() does not find the resource as it has been
created from scratch
Regards,
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
11 years, 8 months