Re: [rules-users] Error with conversion from .brl to .drl file
by Fnu Mahalakshmi
Hi Giovanni,
The classpath shows the commons jar added under UserEntries.
I am getting another error when I try running the program now :
Exception in thread "main" java.lang.NoClassDefFoundError: org/drools/brms/server/util/BRXMLPersistence
at com.org.RulesTest.main(RulesTest.java:40)
Caused by: java.lang.ClassNotFoundException: org.drools.brms.server.util.BRXMLPersistence
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 1 more
This was not coming till now.
The exception come at the line when the .brl file is to be processed.
I am not able to figure out. I tried googling the error. But no use!
Please help!
Thanks
M
------------------------------
Message: 2
Date: Mon, 14 Jun 2010 10:09:50 +0200
From: Giovanni Motta <mottagio(a)gmail.com>
Subject: Re: [rules-users] Error with conversion from .brl to .drl
file
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTim_pHwmnwB0GmYWqE05FHCL1NZkG0f7nP3bHgj0(a)mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"
Are you launching the application from within eclipse?
Have you checked the classpath of the launch configuration? You can see it
by right-clicking the .java file and then selecting "run as --> run
configurations..."
Does it show the commons jar?
2010/6/12 Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
> Hi,
>
> I just tried everything I could think of but still getting error.
>
> Using following code for converting from .brl file to .drl file:
>
>
>
> File file = *new* File(rulesFiles);
>
> String brl = *null*;
>
> *try*{
>
> BRXMLPersistence read = (BRXMLPersistence)
> BRXMLPersistence.*getInstance*();
>
> BRDRLPersistence write = (BRDRLPersistence)
> BRDRLPersistence.*getInstance*();
>
> brl = FileUtils.*readFileToString*(file);
>
> System.*out*.println("File content: " + brl);
>
> String outputDRL = write.marshal(read.unmarshal(brl));
>
> String drlFilePath = "drlFile.drl";
>
> File drlFile = *new* File(drlFilePath);
>
> FileUtils.*writeStringToFile*(drlFile, outputDRL);
>
> addRulesToThisPackage.addPackageFromDrl(*new*
>
> InputStreamReader(RuleRunner.*class*
> .getResourceAsStream(drlFilePath)));
>
> }*catch* (IOException e) {
>
>
>
> e.printStackTrace();
>
> }
>
>
>
> I have added the org.apache.commons .jar files to the classpath.
>
> It contains a FileUtils.java file which I added to the classpath.
>
>
>
> Now the error I get when I run the program is :
>
> Exception in thread "main" java.lang.Error: Unresolved compilation problem:
>
>
> FileUtils cannot be resolved
>
>
>
> at com.org.RuleRunner.loadRuleFile(*RuleRunner.java:70*)//
>
> at com.org.RuleRunner.loadRules(*RuleRunner.java:45*)
>
> at com.org.RuleRunner.runStatelessRules(*RuleRunner.java:102*)
>
> at com.org.RulesTest.main(*RulesTest.java:40*)
>
>
>
>
>
>
>
> I don?t understand why still I am getting the error.
>
> RuleRunner.java:70 is : brl = FileUtils.*readFileToString*(file);
>
> Is there any thing else I could use ?/ Could you give me a hint??
>
> Thank you
>
> M
>
> ------------------------------
>
> *Please consider the environment before printing this email.*
>
> *Visit our website at http://www.nyse.com
> *****************************************************************************
>
> Note: The information contained in this message and any attachment to it is
> privileged, confidential and protected from disclosure. If the reader of
> this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, please notify the sender immediately by replying to
> the message, and please delete it from your system. Thank you. NYSE
> Euronext. *
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
14 years, 5 months
Error using change-set
by Raf
Hi,
I am trying to use a change-set file to load my DSL and DSLR resources, but
I am not able to get it working.
My first attempt was based on the snippet I found here:
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/ht...
<?xml version="1.0" encoding="UTF-8"?>
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'
>
<add>
<resource source='file:classification.dsl' type='DSL' />
<resource source='file:classification.drl' type='DSLR' />
</add>
</change-set>
but I received the following error:
(null: 4, 78): SchemaLocation: schemaLocation value = '
http://drools.org/drools-5.0/change-set.xsd' must have even number of URI's.
(null: 4, 78): cvc-elt.1: Cannot find the declaration of element
'change-set'.
Then, I found the following old post in the mailing list:
http://drools-java-rules-engine.46999.n3.nabble.com/changset-xml-error-wh...
where it was suggested to
"Just replace *xs:schemaLocation='**http://drools.org/drools-5.0/change-set.
xsd* <http://drools.org/drools-5.0/change-set.xsd>*'* by *xs:schemaLocation
='http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd'*"
So I changed my file to:
<?xml version="1.0" encoding="UTF-8"?>
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-setdrools-change-set-5.0.xsd'
>
<add>
<resource source='file:classification.dsl' type='DSL' />
<resource source='file:classification.dslr' type='DSLR' />
</add>
</change-set>
but now I receive the following errors:
(null: 4, 100): 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: 4, 100): cvc-elt.1: Cannot find the declaration of element
'change-set'.
(null: 5, 9): 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: 6, 63): 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: 7, 65): 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>.
What am I missing?
Thanks.
Raf
14 years, 5 months
running brl rules - error
by Fnu Mahalakshmi
Hi,
I have {Rule1.drl,Rule2,drl,Rule3.brl}
Both the .drl rules run correctly but the .brl does not load and gives me the following error
Exception in thread "main" org.drools.rule.InvalidRulePackage: [1,0]: unknown:1:0 mismatched token: [@0,0:0='<',<79>,1:0];
at org.drools.rule.Package.checkValidity(Package.java:424)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:394)
at com.org.RuleRunner.loadRules(RuleRunner.java:45)
at com.org.RuleRunner.runStatelessRules(RuleRunner.java:79)
at com.org.RulesTest.main(RulesTest.java:40)
I am loading my rules as follows:
private RuleBase loadRules(String[] rules) throws Exception{
PackageBuilder builder = new PackageBuilder();
for ( int i = 0; i < rules.length; i++ ) {
String rulesFiles = rules[i];
//Check the type of rule file, then load it
System.out.println("loading rule file : "+rulesFiles);
loadRuleFile(rulesFiles,builder);
}
Package pkg = builder.getPackage();
RuleBase localRuleBase = RuleBaseFactory.newRuleBase();
localRuleBase.addPackage( pkg );
return localRuleBase;
}
private void loadRuleFile(String rulesFiles,PackageBuilder addRulesToThisPackage ) throws DroolsParserException, IOException{
Reader source = new InputStreamReader( RuleRunner.class.getResourceAsStream(rulesFiles) );
//Load the rules , no DSL
addRulesToThisPackage.addPackageFromDrl(source); // is this wrong??? Is there another method that I should
be using???
}
The above code is where I get the error.
Is there some other way to load .brl and .drl files?? We cannot do it together??
I could not find any help on;line on loading and running .brl files.
Please help.
Thank you.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months
Error with conversion from .brl to .drl file
by Fnu Mahalakshmi
Hi,
I just tried everything I could think of but still getting error.
Using following code for converting from .brl file to .drl file:
File file = new File(rulesFiles);
String brl = null;
try{
BRXMLPersistence read = (BRXMLPersistence) BRXMLPersistence.getInstance();
BRDRLPersistence write = (BRDRLPersistence) BRDRLPersistence.getInstance();
brl = FileUtils.readFileToString(file);
System.out.println("File content: " + brl);
String outputDRL = write.marshal(read.unmarshal(brl));
String drlFilePath = "drlFile.drl";
File drlFile = new File(drlFilePath);
FileUtils.writeStringToFile(drlFile, outputDRL);
addRulesToThisPackage.addPackageFromDrl(new
InputStreamReader(RuleRunner.class.getResourceAsStream(drlFilePath)));
}catch (IOException e) {
e.printStackTrace();
}
I have added the org.apache.commons .jar files to the classpath.
It contains a FileUtils.java file which I added to the classpath.
Now the error I get when I run the program is :
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
FileUtils cannot be resolved
at com.org.RuleRunner.loadRuleFile(RuleRunner.java:70)//
at com.org.RuleRunner.loadRules(RuleRunner.java:45)
at com.org.RuleRunner.runStatelessRules(RuleRunner.java:102)
at com.org.RulesTest.main(RulesTest.java:40)
I don't understand why still I am getting the error.
RuleRunner.java:70 is : brl = FileUtils.readFileToString(file);
Is there any thing else I could use ?/ Could you give me a hint??
Thank you
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months
Drools flow ; events with AND join , persistence for flows, being able to suspend and resume flows, and long wait states
by shoukry kattan
Dear All,
I have been evaluating a number of frameworks including jBPM and Drools flow
for my application requirements. Lots of the opinions seem to be inclined
towards Drools flow as its more flexible, knowledge oriented, easier to
integrate with business rules, etc..
The application is some sort of an Email Campaign manager , where different
customers can sign in, prepare (design) and launch email campaigns.
The application should be able to do the following :
1- Receive a list of email addresses, send emails to each of these addresses
starting from a certain date and during a certain time interval of the day ,
do some custom actions, and then wait for reply emails.
2- If a reply email is received and depending on the response text of the
email , and depending on the time the email was received certain actions
need to happen, web service calls need to take place, and error handling for
these calls.
3- The application will manage and run many and different campaigns
(different customers and different flows for each customer) at any point of
time.
*The first question is : *
Is Drools flow the way to go about this?
My main concerns are scalability, suspending, resuming flows, and long wait,
and flows management.
As you see from the requirements :
*There is a scheduling part :*
Certain flows need to be run at a certain point in time, they need to get
suspended and then resumed.
For example start sending emails starting on Dec 1st 2010 and send emails
only in the time interval between 08:00 and 17:00 GMT. By then it might be
that all subscribers have been sent emails, but it might not be the case,
the process needs to (resume) on Dec 2nd and send a second batch, however
certain (users) already received emails and they should be able to (continue
at different stages of the flow)
*There are long wait states : *
Days or even weeks , i need to persist, suspend / resume and terminate flows
(manage flows)
*External Events :
*
This is where i got stuck first, i tried to put together a simple flow (see
attached screenshot) , there is a start node , connected to an action node,
connected to a join.
An event node is connected to a second action node, which is connected to
the join. The join is an AND join , after the join there is an action and
the end node.
Here is the sample code i am using to launch the flow :
KnowledgeBuilder builder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
builder.add(ResourceFactory.newClassPathResource("campaign.rf",
CampaignsDroolsPoc.class), ResourceType.DRF);
if (builder.hasErrors()) {
KnowledgeBuilderErrors errors = builder.getErrors();
Iterator<KnowledgeBuilderError> iterator = errors.iterator();
while (iterator.hasNext()) {
System.out.println(iterator.next().toString());
}
}
KnowledgeBase base = KnowledgeBaseFactory.newKnowledgeBase();
base.addKnowledgePackages(builder.getKnowledgePackages());
final StatefulKnowledgeSession ksession = base
.newStatefulKnowledgeSession();
// KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Log",
new SendSMSWorkItemHandler());
ProcessInstance startProcess = ksession.startProcess("flow");
System.out.println("Signaling event");
startProcess.signalEvent("ev1", "ev1");
System.out.println("Signaled");
ksession.fireUntilHalt();
I am noticing that the event get triggered, the action node connected to the
event gets triggered, however things seem to get stuck at the join. The flow
does not continue past the AND join and the flow seems to get stuck. The
action following the node does not get triggered.
I have seen the post about the Manufacturing process , however there is no
code sample of how this guy got that to work.
http://drools-java-rules-engine.46999.n3.nabble.com/DROOLS-Flow-as-a-Manu...
I also went through the drools flow documentation , and all the example
codes, however i didn't find anything there.
In addition any hints about the way to go about architecting the solution,
and implementing it would be great.
While googling I noticed that there are many more jBPM examples than drools
flow and this is not so good for guys like me trying to get started.
If you help me guys I would be glad to post the entire Proof of concept I am
working on as a drools flow example.
Regards,
Shoukry Kattan
14 years, 5 months
Error with loading Rule files
by Mahalakshmi
Hi guys,
I am converting a .brl file to a .drl file for loading to my rule base.
using following code:
File file = *new* File(rulesFiles);
String brl = *null*;
*try*{
BRXMLPersistence read = (BRXMLPersistence)
BRXMLPersistence.*getInstance*();
BRDRLPersistence write = (BRDRLPersistence)
BRDRLPersistence.*getInstance*();
brl = FileUtils.*readFileToString*(file);
System.*out*.println("File content: " + brl);
String outputDRL = write.marshal(read.unmarshal(brl));
String drlFilePath = "drlFile.drl";
File drlFile = *new* File(drlFilePath);
FileUtils.*writeStringToFile*(drlFile, outputDRL);
addRulesToThisPackage.addPackageFromDrl(*new*
InputStreamReader(RuleRunner.*class*
.getResourceAsStream(drlFilePath)));
}*catch* (IOException e) {
e.printStackTrace();
}
I have downloaded org.apache.commons.io package from
http://commons.apache.org/io/download_io.cgi site.
It does not contain .jar file for org.apache.commons.io.FileUtils. But
contains .java file for the same.
I add it to my classpath and add import org.apache.commons.io.FileUtils to
my import statements.
But I get this error:
xception in thread "main" java.lang.Error: Unresolved compilation problem:
FileUtils cannot be resolved
at com.org.RuleRunner.loadRuleFile(*RuleRunner.java:70*)//
at com.org.RuleRunner.loadRules(*RuleRunner.java:45*)
at com.org.RuleRunner.runStatelessRules(*RuleRunner.java:102*)
at com.org.RulesTest.main(*RulesTest.java:40*)
Could some one please tell me if there is an alternative way for
converting/loading .brl files (business guided rule) to my knowledge base ?
Or point me towards the correct download for
org.apache.commons.io.FileUtils.
Please help me out. Thank you.
-M
14 years, 5 months
RuleBase Question
by malkhafaji
Hello,
I have two questions. Hopefully they are very simple:
1. If I wanted to dynamically update a package in the RuleBase because I
found out that the drl was updated on disk, can I just do this:
ruleBase.addPackage(myPackage);
And this will automatically replace (remove the old one, and add the new
one)? Or do I have to implicitly first remove the existing one and THEN add
the modified one again?
I have the following code:
if (ruleBase.getPackage(onePackage.getName()) != null) {
ruleBase.removePackage(onePackage.getName());
}
ruleBase.addPackage(onePackage);
Is this a code practice to do?
2. My second question is, the statement above in the body of the IF block,
threw the following exception:
Exception in thread "AdminHandler_0_123877285495354"
java.lang.NullPointerException
INFO|7032/0|10-06-10 13:43:55| at
org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:235)
INFO|7032/0|10-06-10 13:43:55| at
org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:413)
INFO|7032/0|10-06-10 13:43:55| at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:729)
INFO|7032/0|10-06-10 13:43:55| at
org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:657)
INFO|7032/0|10-06-10 13:43:55| at [statement in the IF block above]
Any ideas why that is?
Thanks.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/RuleBase-Question-tp8...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Error loading .brl rules
by Fnu Mahalakshmi
Hi,
I am getting an error reading .brl files.
Using this snippet of code for converting from brl to drl
import org.apache.commons.io.*;
String fileName = "GuidedRule.brl";
File file = new File(fileName);
String fileAsString = FileUtils.readFileToString(file);
BRXMLPersistence read = (BRXMLPersistence) BRXMLPersistence.getInstance();
BRDRLPersistence write = (BRDRLPersistence) BRDRLPersistence.getInstance();
String outputDRL = write.marshal(read.unmarshal(fileAsString));
String drlFilePath = "drlFile.drl";
File drlFile = new File(drlFilePath);
FileUtils.writeStringToFile(drlFile, outputDRL);
builder.addPackageFromDrl(new
InputStreamReader(RuleRunner.class.getResourceAsStream(drlFilePath)));
For this, I added commons-logging-1.1.1.jar file to my classpath. But still FileUtils is not getting resolved.
SO am unable to use FileUtils to convert input to String format.
Is there any other way to do this??? Why am I getting the error even after adding the jar to my classpath???
Please Help,
Thank you.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months
Re: [rules-users] error running .brl frules
by Fnu Mahalakshmi
Hi,
I have {Rule1.drl,Rule2,drl,Rule3.brl}
Both the .drl rules run correctly but the .brl does not load and gives me the following error
I am loading my rules as follows:
private RuleBase loadRules(String[] rules) throws Exception{
PackageBuilder builder = new PackageBuilder();
for ( int i = 0; i < rules.length; i++ ) {
String rulesFiles = rules[i];
//Check the type of rule file, then load it
System.out.println("loading rule file : "+rulesFiles);
loadRuleFile(rulesFiles,builder);
}
Package pkg = builder.getPackage();
RuleBase localRuleBase = RuleBaseFactory.newRuleBase();
localRuleBase.addPackage( pkg );
return localRuleBase;
}
private void loadRuleFile(String rulesFiles,PackageBuilder addRulesToThisPackage ) throws DroolsParserException, IOException{
int len = rulesFiles.length();
if(rulesFiles.substring((len-4), len).equalsIgnoreCase(".brl")){
BRXMLPersistence read = (BRXMLPersistence) BRXMLPersistence.getInstance();
BRDRLPersistence write = (BRDRLPersistence) BRDRLPersistence.getInstance();
String brl = rulesFiles;
String outputDRL = write.marshal(read.unmarshal(brl));
rulesFiles = outputDRL;
}
Reader source = new InputStreamReader( RuleRunner.class.getResourceAsStream(rulesFiles) );
//Exception if rule files are not found
if(null==source){
throw new FileNotFoundException("Cannot find rule file:"+rulesFiles);
}
//Load the rules , no DSL
addRulesToThisPackage.addPackageFromDrl(source);
}
I get the following error:
[Fatal Error] :1:1: Content is not allowed in prolog.
Exception in thread "main" com.thoughtworks.xstream.io.StreamException: : Content is not allowed in prolog.
at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:65)
at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:47)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:781)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:773)
at org.drools.brms.server.util.BRXMLPersistence.unmarshal(BRXMLPersistence.java:91)
at com.org.RuleRunner.loadRuleFile(RuleRunner.java:65)
at com.org.RuleRunner.loadRules(RuleRunner.java:42)
at com.org.RuleRunner.runStatelessRules(RuleRunner.java:90)
at com.org.RulesTest.main(RulesTest.java:40)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:58)
... 8 more
Any Idea?????
Thank you.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months
AddKnowledgePackage with rules that uses global vars complains that the global var is not set
by dgimenes
I'm trying to add rules after the Process (workflow) started. That works, but
I wanted the rules to access database data using hibernate.
So I created a global object to store my EntityManager (I'm using SEAM; it's
like a Session object).
The problem is that when I add the KnowledgePackage with the rule that uses
the EntityManager, an exception is thrown because the global is not set.
BUT, if I try to set the global var, I get an exception saying it does not
exist.
Do you have any idea?
I've seen that when I add the KnowledgePackage to the
StatefullKnowledgeSession the rules are fired, and then I get the exception.
Is there a way to NOT fire the rules after inserting the packages?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/AddKnowledgePackage-w...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months