Usage of the jcr2vfs migration tool
by dstern
Are there instructions anywhere for using the jcr2vfs migration tool?
I pruned my JCR repository (created under Guvnor 5.6.0.Final) until the
migration tool ran without error (which meant archiving all my brl format
assets among other things) but I'm not sure what to do with the output.
I copied the contents of outputVfs to my existing .niogit folder (leaving
the .niogit generated by the migration tool alone) but the migrated
repository doesn't show up. Is this because I didn't replace my existing
.niogit with the one generated by the tool?
--
View this message in context: http://drools.46999.n3.nabble.com/Usage-of-the-jcr2vfs-migration-tool-tp4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 4 months
Drools 6.0.1: Pushing changes back to Workbench GIT using SSH
by dotrc
I am using workbench for managing my rules maven projects within the embedded
GIT repository. I am aware that using git:// protocol, I can clone an
existing rule repository; I can do this successfully.
For authoring rules, I want to use Eclipse (using EGit). I want to push my
commits back to the GIT repo. I understand that I'll have to use ssh
protocol instead of git for specifying the repo, something like this:
ssh://{userName}@localhost:8001/{repoName}
When we use a standard GIT repo like stash, it gives us an option to set our
public key on the stash server, but I'm not able to find a way to do that
with the embedded ssh server within workbench. Hence, I'm not able to
authenticate myself and perform a push.
We tried creating a private-public key pair using ssh-keygen and put that
within c:\users\<username>\.ssh and added the public key to
'authorized_keys(2) (though I know this may not be the right place) and then
used the private key as the identity file with ssh client directly from
cygwin, again to no avail.
Any pointers will be really appreciated.
Also, should the username be 'admin' or any other specific one for pushing?
Will the existing Windows username work?
Thanks,
Rishi
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Pushing-changes-back-to-Wo...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 4 months
How to read XML using XMLPackageReader-Drools-compiler.5.2.1.final?
by Praveen
Hi,
I am using Drools-compiler.5.2.1.final.
I am trying to convert an drl to xml and vice versa using DrlParser,
DrlDumper, XMLPackageReader and XML Dumper.
Drl to XML conversion works fine but XML to Drl throws NPE.
I have placed the XML file under a folder called sample.
NPE is thrown at line 5..
Also attached is the exception.
Please suggest.
TIA.
Reader source = new InputStreamReader(
DroolsConversionHelper.class.getResourceAsStream(xmlFileName));
PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
XmlPackageReader reader = new
XmlPackageReader(conf.getSemanticModules());
DrlDumper dumper = new DrlDumper();
//line 5 reader.read(source);
PackageDescr descr = reader.getPackageDescr();
String test = dumper.dump(descr);
System.out.println(test);
java.lang.NullPointerException
at
org.drools.xml.ExtensibleXmlParser.resolveSchema(ExtensibleXmlParser.java:696)
at
org.drools.xml.ExtensibleXmlParser.resolveEntity(ExtensibleXmlParser.java:622)
at
com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
Regards,
Praveen.
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-read-XML-using-XMLPackageReader-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 5 months
Drools Planner: Vehicle routing problems
by davidglassborow
Hi,
as discussed the other day with Ge0ffrey on IRC, I've been trying to
get some vehicle routing done using the new TSP / chaining functionality in
drools planner.
I've written an example, but am having problems with the chaining of jobs
together. After pulling my hair out, I've put together an example into my
fork of planner, showing a simplified example of how I am approaching it,
and the problem that can be replicated.
https://github.com/davidglassborow/drools-planner/tree/vehicle_routing
It is a very simple console app along the same lines as the hello world
example for NQueens.
On running it will print out the chains, and you will see the some Jobs
appear more than once in the same list.
On the planning variable it seems to be get assigned in front of itself,
I've put some notes in the source, and checked that the same doesn't occur
in your TSP example.
I'm not sure if its a bug in the way I've setup things, or whether its an
issue in the chain move code.
Greatly appreciated if anybody in the know gets a chance to have a look.
Thanks,
David
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-routing-problems...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 6 months
"Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE instead of explicit version number (eg: 0.0.1)
by Matteo Mortari
Hello,
in the hope this could save time if someone has been experiencing same
issue. Drools 6.0.1.Final
I had message "Cannot find KieModule" with kieServices.newKieContainer()
with LATEST or RELEASE , instead of explicit version number (eg: 0.0.1) on
a application where the KIE module Rule artifact project kjar has been
locally-installed from remote Maven repository, that is the right hand side
of this diagram:
http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/...
Meaning that before launching Application, I performed
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get
-Dartifact=com.acme:X:LATEST -DrepoUrl=
http://nexus-hostname/nexus/content/repositories/releases/
Then:
kieServices.newKieContainer() with LATEST,
kieServices.newKieContainer() with RELEASE,
failed with stack trace:
Exception in thread "main" java.lang.RuntimeException: Cannot find
KieModule: com.acme:X:RELEASE
at
org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)
at (...)
But kieServices.newKieContainer() with a fixed version, eg.: 0.0.2 did
indeed worked OK, if installed in the local .m2 repository.
To avoid this issue, I found only 3 possible workarounds
1 use mvn maven-dependency-plugin:go-offline but did not work all of the
time
2 manually ensure maven-metadata-local.xml file is generate in local .m2
repository
3 just download manually .jar and .pom of the remote maven repo, and then
install with mvn install:install-file
In this case, of workaround kieServices.newKieContainer() works OK with
all the version LATEST, RELEASE, and fixed version number.
Raise jira DROOLS-419 with more details and example projects, please don't
hate me if was just me missing something or not-Drools issue actually
=P
In my defense I had good intentions saving somebody's else time in case
same strange behavior, which is really strange because to me it worked only
with explicit fixed version number, and that was really bizarre ;)
Hope this helps,
Ciao
MM
10 years, 6 months
Drools 6 support for changeset
by wtang
I have a requirement in which when a rule is changed, the change needs to be
reflected immediately without retarting the system.
In Drools 5.x we can use the changeset.xml with the knowlegde agent. Now in
Drool 6.0 we have Kie API.
1) does Kie support changeset.xml?
2) Upper management don't want to use kie, they want to use jsr94. Does
jsr94 support changeset.xml?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp402713...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months
Drools Planner: what if possible values of a PlanningVariable are dependent of another one?
by Willem van Asperen
Hi All,
I have a PlanningEntity that has several planning variables, say A and
B. Now, if A is O then B can be X or Y and when A is P then B can be Y or Z.
I see two routes:
* create a solution property that generates X, Y and Z as alternatives
for B and rely on the score rules to dismiss improper values,
depending on the value of A
* create an entity property that only generates the possible values
for B (i.e. X,Y for A=O and Y,Z for A=P)
What is the best route?
(Alternatively I do not use the constructionHeuristic and just start of
my solution with a randomly (but correct) generated solution)
Regards,
Willem
10 years, 7 months
Spring, KnowledgeAgent, and Guvnor
by paulB
I'm having a problem connecting my KnowledgeAgent to a package in Guvnor.
I'm using Spring to instantiate the KnowledgeAgent. The agent initializes
perfectly well when I point to a local change-set that in-turn points to a
local rule. However, even though I have the same rule in a package in
Guvnor, the KnowledgeAgent fails with the following exception when I point
to the package's change-set in Guvnor:
The code at KnowledgeBaseImpl.java:148 is (using 5.3.0.Final):
Here is the simple rule in the Guvnor as returned by the URL for the package
source URL:
Here is the local change-set definition. The line that is commented is the
failing resource, whereas the local file resource works fine:
Guvnor is residing on a Tomcat server.
I could not find anything related to this on the forum. Thank you for any
hints.
-Paul
--
View this message in context: http://drools.46999.n3.nabble.com/Spring-KnowledgeAgent-and-Guvnor-tp3500...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 7 months