Guvnor Uploads without Eclipse
by Amin Mohammed-Coleman
Hi
I am currently looking at building a custom maven task that uploads BPMN definitions from a project to a remote Guvnor installation. I was looking at the current Eclipse Guvnor plugin and noticed lots of code around Eclipse (which makes sense :)) . I was wondering whether there was any generic code that I could take a look at without using eclipse dependencies?
Any help would be appreciated.
Thanks
12 years, 7 months
make the Guvnor interface into French
by freelance developpement
Hi every one,
For simplicity I must make the interface Guvnor for administration of
business rules, in French and not English under Internet Explorer or
Firefox.
Have you ant idea?
thanx in advance
12 years, 7 months
UnSubscribe:my mail.
by Manohar Kokkula
Hello,
Please unsubscribe my mail: manohar.kokkula(a)tcs.com.
Thanks in advance.
Manohar Kokkula
Mailto: manohar.kokkula(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
12 years, 7 months
Suscribe : my email
by quentin chevalier
Hello,
There is my email : quentin.chevalier.altran(a)gmail.com
Thx & regards
12 years, 7 months
KnowledgeAgent Changeset problems
by albertorugnone
Hi all,
I have some problem with KnowledgeAgent, maybe you can help me. I will list
these in the following
1) during change set loading I have the following error
(null: 1, 207): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.xsd', because 1) could not find the document; 2) the
document could not be read; 3) the root element of the document is not
<xsd:schema>.
(null: 1, 207): cvc-elt.1: Cannot find the declaration of element
'change-set'.
(null: 1, 216): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.xsd', because 1) could not find the document; 2) the
document could not be read; 3) the root element of the document is not
<xsd:schema>.
(null: 1, 311): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.xsd', because 1) could not find the document; 2) the
document could not be read; 3) the root element of the document is not
<xsd:schema>
I suppose this is because change-set.xml can be reached. What is a correct
setting for xs:schemaLocation.
2) I would like scan also a directories in order to add knowledge to my rule
set if I add a new file. How I can do that?
3) KnowledgeAgentConfiguration aconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
aconf.setProperty("drools.agent.newInstance", "true") <== what is the
meaning of this property? Where I can find documentation about those
properties
4) why when I would set a global variable I receive
Exception in thread "main" java.lang.RuntimeException: Unexpected global
[service]
at
org.drools.common.AbstractWorkingMemory.setGlobal(AbstractWorkingMemory.java:615)
at
org.drools.impl.StatefulKnowledgeSessionImpl.setGlobal(StatefulKnowledgeSessionImpl.java:332)
at
com.sample.DroolsKnowledgeAgentTest.main(DroolsKnowledgeAgentTest.java:90)
I the following an example about my question
@SuppressWarnings("restriction") public class DroolsKnowledgeAgentTest {
public static class Service {
}
DroolsKnowledgeAgentTest() {
KnowledgeBase newKnowledgeBase = KnowledgeBaseFactory.newKnowledgeBase();
ResourceFactory.getResourceChangeNotifierService()
.start();
ResourceFactory.getResourceChangeScannerService()
.start();
final ResourceChangeScannerConfiguration sconf =
ResourceFactory.getResourceChangeScannerService()
.newResourceChangeScannerConfiguration();
sconf.setProperty("drools.resource.scanner.interval", "2");
ResourceFactory.getResourceChangeScannerService()
.configure(sconf);
final KnowledgeAgentConfiguration aconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
aconf.setProperty("drools.agent.scanDirectories", "true");
aconf.setProperty("drools.agent.scanResources", "true");
aconf.setProperty("drools.agent.newInstance", "true");
final KnowledgeAgent agent =
KnowledgeAgentFactory.newKnowledgeAgent("pch.sel.knowledge.agent",
newKnowledgeBase, aconf);
// if (_l.isDebugEnabled()) {
/* we need some log every time */
agent.setSystemEventListener(new PrintStreamSystemEventListener());
// }
}
public static void main(String[] args) throws IOException {
ResourceFactory.getResourceChangeNotifierService()
.start();
ResourceFactory.getResourceChangeScannerService()
.start();
String xml = "";
xml += "<change-set xmlns='http://drools.org/drools-5.0/change-set'";
xml += "
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'";
xml += "
xs:schemaLocation='http://drools.org/drools-5.0/change-set
drools-change-set-5.0.xsd' >";
xml += " <add> ";
xml += " <resource
source='Z:/WSP/drools-test/src/main/java/com/sample/rule1.drl' type='DRL'
/>";
xml += " </add> ";
xml += "</change-set>";
FileManager fileManager = new FileManager();
File fxml = fileManager.newFile("changeset.xml");
BufferedWriter output = new BufferedWriter(new FileWriter(fxml));
output.write(xml);
output.close();
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
ResourceChangeScannerConfiguration sconf =
ResourceFactory.getResourceChangeScannerService()
.newResourceChangeScannerConfiguration();
sconf.setProperty("drools.resource.scanner.interval", "2");
ResourceFactory.getResourceChangeScannerService()
.configure(sconf);
KnowledgeAgentConfiguration aconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
aconf.setProperty("drools.agent.scanDirectories", "true");
aconf.setProperty("drools.agent.scanResources", "true");
aconf.setProperty("drools.agent.newInstance", "true");
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("test
agent", kbase, aconf);
kagent.applyChangeSet(ResourceFactory.newUrlResource(fxml.toURI()
.toURL()));
StatefulKnowledgeSession ksession = kagent.getKnowledgeBase()
.newStatefulKnowledgeSession();
ksession.setGlobal("service", new Service());
}
}
and rule named rule1.drl
#created on: 29-Feb-2012
package com.sample
#list any import classes here.
#declare any global variables here
global DroolsKnowledgeAgentTest.Service service;
rule "Your First Rule"
when
#conditions
then
#actions
end
Thank you very much for your answers and kind regards
Alberto
--
View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgent-Changeset-problems-tp378...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 7 months
debug
by grandjean
Hi
I am a newbie and i would like to use debugging mode under eclipse indigo
sr2 with drools 5.3.
So, I created a very simple drools Helloworld project.
I added two breakpoints, one in the 'then' section of the 'goodbye' rule and
the other one in the line where I call fireAllRules();
I selected the main class and right clicked so as to select 'Debug As Drools
Application'
So, it stops on the FireeAllRules() but it doesn't stop on the rule
breakpoint.
In addition, the Agenda, Working Memory views are totally blank
How can I get a working debug mode?
Thks in advance
Bruno Grandjean
--
--
View this message in context: http://drools.46999.n3.nabble.com/debug-tp3889858p3889858.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 7 months
Adding a new KnowledgePakage to and existing KnowledgeBase
by mike
Hi there,
I am having problems adding knowledge packages to a kb. For instance I
create a kb n' add this drl:
package test
rule "abc"
then System.out.println("abc");
end
then I want to add another drl with the same package.
package test
rule "123"
then System.out.println("123");
end
this is the code i'm using for adding
public static void add(KnowledgeBase kb, String content) throws Exception {
(1) KnowledgeBuilder builder =
KnowledgeBuilderFactory.newKnowledgeBuilder(kb);
(2) builder.add(
ResourceFactory.newByteArrayResource(content.getBytes()),
ResourceType.DRL);
if (builder.hasErrors())
throw new Exception(builder.getErrors().toString());
kb.addKnowledgePackages(builder.getKnowledgePackages());
}
please notice i am creating a new builder every time and the kb is passed
in on (1)
the first call to add works fine. but on the second i get
a NullPointerException on line (2)
java.lang.NullPointerException
at
org.drools.rule.builder.dialect.java.PackageStore.write(PackageStore.java:47)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(EclipseJavaCompiler.java:350)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:474)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:358)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:369)
at
org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:53)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:71)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:869)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:826)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:404)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:586)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37)
thank you very much
mike
12 years, 7 months