Re: [rules-users] Dynamic rule file uploading
by Fnu Mahalakshmi
Hi,
Thanks for the quick reply.
But even by using knowledge agent I have to keep specifying each of the files one by one right? Which ever is contained in my folder with all the rule files? As I would keep doing:
kbuilder.add( ResourceFactory.newUrlResource( "file://myrules.drl" ),
ResourceType.DRL);
So again I would have to list all my files and pass it to the knowledge agent which would add the new rule to the existing package( created using package builder).
Am I going wrong here??
Please help.
Thank you.
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Tuesday, June 15, 2010 11:13 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 74
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Uploading rules dynamically (Fnu Mahalakshmi)
2. Dynamic rule file uploading (Fnu Mahalakshmi)
3. Re: Dynamic rule file uploading (PAYET, Manuel)
----------------------------------------------------------------------
Message: 1
Date: Tue, 15 Jun 2010 10:56:42 -0400
From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
Subject: [rules-users] Uploading rules dynamically
To: "'rules-users(a)lists.jboss.org'" <rules-users(a)lists.jboss.org>
Message-ID:
<994758E35590274E955FA75763C5AA5002D0111F(a)MTEXMBXP01.ad.NYX.com>
Content-Type: text/plain; charset="us-ascii"
Hi Guys,
How can I dynamically upload my rules? Can someone point me towards some documentation for the same??
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
Uploading rules dynamically
by Fnu Mahalakshmi
Hi Guys,
How can I dynamically upload my rules? Can someone point me towards some documentation for the same??
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
Dynamic rule file uploading
by Fnu Mahalakshmi
Hi guys,
I have : {R1.drl,R2.drl,R3.brl}
After conversion and loading I have {R1.drl,R2.drl,R3.brl,R3.drl} files in the same directory where all my rules are stored.
I am using:
File folder = new File("SRC/MAIN/RULES");
File[] listOfFiles = folder.listFiles();
for listing all the files in my rules directory.
Now is there anyway that I can just hold on to the required files whenever my rule files are updated rather than having to manually keeping deleting and updating my rules directory?
Is there a more better way to do it rather than just listing all the files in the directory??
Thanks,
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 with executing rules
by Fnu Mahalakshmi
Hi Guys,
Thanks a lot for help!
Got it resolved! Feels good to get it working :)
But have no idea what the problem was :) I created a brand new rule and it worked!
Thanks
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Tuesday, June 15, 2010 10:11 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 72
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Error with executing rules (PAYET, Manuel)
2. Re: Error with executing rules (Giovanni Motta)
----------------------------------------------------------------------
Message: 1
Date: Tue, 15 Jun 2010 16:08:40 +0200
From: "PAYET, Manuel" <manuel.payet(a)capgemini.com>
Subject: Re: [rules-users] Error with executing rules
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<5104F06B63E3164FAEB2F42B920311654CCCA2DC(a)CORPMAIL05.corp.capgemini.com>
Content-Type: text/plain; charset="iso-8859-1"
a : A( modified == "false" ) ==> here "false" is a String
and a.setModified( true ); ==> here true is a boolean
from your use of modified, I presume that modified is of boolean type. If it is, you'd probably want to do something like
rule "Rule3"
dialect "mvel"
when
a : A( modified == false )
then
a.setModified( true );
update( a );
end
because, modified will never be equal to "false" in your file cause it"s a String
________________________________
De : rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] De la part de Fnu Mahalakshmi
Envoy? : mardi 15 juin 2010 16:03
? : 'rules-users(a)lists.jboss.org'
Objet : [rules-users] Error with executing rules
Hi guys,
I have few .drl rules and 1 .brl rule (which I converted into a .drl rule as guided by the documentation online)
All my rules get created and fired. But the converted .brl rule does not get executed only.
I am unable to understand why.
Anyway I can check how it is working??
I put in the most basic rule which should work:
The coverted .drl file looks like this:
rule "Rule3"
dialect "mvel"
when
a : A( modified == "false" )
then
a.setModified( true );
update( a );
end
// A being my fact with attribute modified set to false in the beginning.
The import statements are in a rule.package in the same folder.
Please help me. I do not understand why this rule doesn't get executed. All others do!
Thanks
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.
</PRE><p style="font-family:arial;color:grey" style="font-size:13px">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</p><PRE>
14 years, 5 months
Re: [rules-users] Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
by Vijay K Pandey
Any one on this issue? Any Drools Flow expert?
Appreciate your time for taking a look at it.
Thanks
Vijay
From: Vijay K Pandey
Sent: Thursday, June 10, 2010 12:03 PM
To: 'Rules Users List'
Subject: RE: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
Should I log this as a JIRA ticket.
Thanks
Vijay
From: Vijay K Pandey
Sent: Wednesday, June 09, 2010 9:57 AM
To: 'Rules Users List'
Subject: Drools 5.1.0.M2 - WorkItemNodeInstance -- Listeners can't get hold of WorkItem object
Hi,
There is a change done in Drools 5.1.0.M2 - org.drools.workflow.instance.node.WorkItemNodeInstance class in the method
public void triggerCompleted(WorkItem workItem) at line 196 which is setting the workItemId as -1
this.workItemId = -1;
Due to the above change the listeners which are attached to the "complete" event of the work item - such as the method below
public void beforeNodeLeft(ProcessNodeLeftEvent event) are not able to get hold of the associated workitem object as it returns null.
Is there any specific reason that workItemId is set to -1 even before the associated listeners get triggered or is this a bug?
If it was an intended change then how do I get hold of the "WorkItem" object in the attached listeners.
Thanks
Vijay
p.s This change was not there in the snapshot of 18th April 2010 which I was earlier working on. Above is the only change in this class from the snapshot of 18th April and 5.1.0.M2
14 years, 5 months
Re: [rules-users] rules-users Digest, Vol 43, Issue 72
by Fnu Mahalakshmi
Hi,
Thanks for the quick response.
I sent you the converted .drl file.
It gets set like that automatically after conversion.
I just include false in the literal field not "false".
How else could I specify that?
Thanks
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Tuesday, June 15, 2010 10:11 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 72
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Error with executing rules (PAYET, Manuel)
2. Re: Error with executing rules (Giovanni Motta)
----------------------------------------------------------------------
Message: 1
Date: Tue, 15 Jun 2010 16:08:40 +0200
From: "PAYET, Manuel" <manuel.payet(a)capgemini.com>
Subject: Re: [rules-users] Error with executing rules
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<5104F06B63E3164FAEB2F42B920311654CCCA2DC(a)CORPMAIL05.corp.capgemini.com>
Content-Type: text/plain; charset="iso-8859-1"
a : A( modified == "false" ) ==> here "false" is a String
and a.setModified( true ); ==> here true is a boolean
from your use of modified, I presume that modified is of boolean type. If it is, you'd probably want to do something like
rule "Rule3"
dialect "mvel"
when
a : A( modified == false )
then
a.setModified( true );
update( a );
end
because, modified will never be equal to "false" in your file cause it"s a String
________________________________
De : rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] De la part de Fnu Mahalakshmi
Envoy? : mardi 15 juin 2010 16:03
? : 'rules-users(a)lists.jboss.org'
Objet : [rules-users] Error with executing rules
Hi guys,
I have few .drl rules and 1 .brl rule (which I converted into a .drl rule as guided by the documentation online)
All my rules get created and fired. But the converted .brl rule does not get executed only.
I am unable to understand why.
Anyway I can check how it is working??
I put in the most basic rule which should work:
The coverted .drl file looks like this:
rule "Rule3"
dialect "mvel"
when
a : A( modified == "false" )
then
a.setModified( true );
update( a );
end
// A being my fact with attribute modified set to false in the beginning.
The import statements are in a rule.package in the same folder.
Please help me. I do not understand why this rule doesn't get executed. All others do!
Thanks
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.
</PRE><p style="font-family:arial;color:grey" style="font-size:13px">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</p><PRE>
14 years, 5 months
Error with executing rules
by Fnu Mahalakshmi
Hi guys,
I have few .drl rules and 1 .brl rule (which I converted into a .drl rule as guided by the documentation online)
All my rules get created and fired. But the converted .brl rule does not get executed only.
I am unable to understand why.
Anyway I can check how it is working??
I put in the most basic rule which should work:
The coverted .drl file looks like this:
rule "Rule3"
dialect "mvel"
when
a : A( modified == "false" )
then
a.setModified( true );
update( a );
end
// A being my fact with attribute modified set to false in the beginning.
The import statements are in a rule.package in the same folder.
Please help me. I do not understand why this rule doesn't get executed. All others do!
Thanks
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 uploading and reading rule files
by Fnu Mahalakshmi
Hi Guys,
I have successfully converted my .brl file to a .drl file using the code below and added it to my rulebase.
The file gets created with the required .drl code (which resembles the view source of a guided business rule created in guvnor editor).
But the rule does not seem to be getting fired. I tried setting it to the most basic option which should work - doesn't work.
Please tell me if I am missing something.
My code is below:
File file = new File("src/main/rules/Rule3.brl");
String brl = null;
String outputDRL =null;
BRXMLPersistence read = (BRXMLPersistence) BRXMLPersistence.getInstance();
BRDRLPersistence write = (BRDRLPersistence) BRDRLPersistence.getInstance();
brl = FileUtils.readFileToString(file);
System.out.println("File content: " + brl);
outputDRL = write.marshal(read.unmarshal(brl));
String drlFilePath = "src/main/rules/drlFile.drl";
String path = "/drlFile.drl";
System.out.println("drlfile "+drlFilePath);
File drlFile = new File(drlFilePath);
FileUtils.writeStringToFile(drlFile, outputDRL);
Reader source = new InputStreamReader( RuleRunner.class.getResourceAsStream(path) );
addRulesToThisPackage.addPackageFromDrl(source);
The generated .drl file looks like this:
rule "Rule3"
dialect "mvel"
when
B( name == "xyz" )
then
A fact0 = new a();
fact0.setModified( true );
insertLogical( fact0 );
end
I have my import statements in a file rule.package in the same directory as the rules files.
Please tell me if you can point out where my mistake is.?? I am clueless!
Thanks
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 with conversion from .brl to .drl file
by Fnu Mahalakshmi
Hi,
This is my exact code:
I added the missing BRXMLpackage again.
I have my .brl file in the current working directory with all the .drlfiles.
When I do: File file = new File(rulesFiles); => I get FileNotFound exception // I don't understand this as the file is in the correct path as other files
When I hardcode the path - I get the conversion to the XML format (which I printed to the console)- the new drl file gets formed - but not in the current working directory - it is in the main project directory.
Program again crashes at this line:
addRulesToThisPackage.addPackageFromDrl(new
InputStreamReader(RuleRunner.class.getResourceAsStream(drlFilePath)));
I get error stack:
Exception in thread "main" java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at com.org.RuleRunner.loadRuleFile(RuleRunner.java:81)
at com.org.RuleRunner.loadRules(RuleRunner.java:43)
at com.org.RuleRunner.runStatelessRules(RuleRunner.java:104)
at com.org.RulesTest.main(RulesTest.java:40)
**********************************************************************
My code is as follows:
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();
}
Am I going wrong at some part????
Please help,
Thanks
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Monday, June 14, 2010 10:02 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 69
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Error with conversion from .brl to .drl file (Fnu Mahalakshmi)
2. Re: Error with conversion from .brl to .drl file
(Swindells, Thomas)
3. Re: rules-users Digest, Vol 43, Issue 68 (Fnu Mahalakshmi)
----------------------------------------------------------------------
Message: 1
Date: Mon, 14 Jun 2010 09:23:33 -0400
From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
Subject: Re: [rules-users] Error with conversion from .brl to .drl
file
To: "'rules-users(a)lists.jboss.org'" <rules-users(a)lists.jboss.org>
Message-ID:
<994758E35590274E955FA75763C5AA5002D010F3(a)MTEXMBXP01.ad.NYX.com>
Content-Type: text/plain; charset="us-ascii"
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
Re: [rules-users] rules-users Digest, Vol 43, Issue 68
by Fnu Mahalakshmi
Hi Kicho,
I could not find addPackageFromBRL() in Package Builder.
Any other options???
Thanks
M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Monday, June 14, 2010 8:36 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 68
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: running brl rules - error (kicho)
2. Error using change-set (Raf)
3. Re: Error using change-set (Esteban Aliverti)
4. Re: Error using change-set (Raf)
----------------------------------------------------------------------
Message: 1
Date: Mon, 14 Jun 2010 04:10:02 -0700 (PDT)
From: kicho <golijat(a)gmail.com>
Subject: Re: [rules-users] running brl rules - error
To: rules-users(a)lists.jboss.org
Message-ID: <1276513802820-894097.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
Hi,
you should have a look at PackageBuilder javadoc. There is a method for
adding brl's:
public void addPackageFromBrl(Resource resource)
throws DroolsParserException,
IOException
Throws:
DroolsParserException
IOException
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/running-brl-rules-err...
Sent from the Drools - User mailing list archive at Nabble.com.
------------------------------
Message: 2
Date: Mon, 14 Jun 2010 13:24:05 +0200
From: Raf <r.ventaglio(a)gmail.com>
Subject: [rules-users] Error using change-set
To: rules-users(a)lists.jboss.org
Message-ID:
<AANLkTik-vro4abvyCYyt2Wtjud7utoEOQentIfvCl5_u(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
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