RE: [rules-users] name
by Michael Rhoden
Wonderful idea. D-rules or some variant is much better than the previous
2 names :)
Telling an exec we saved a lot of time & money using this system called
"Drools" always got me a few looks. Likewise I dont go around saying
the new version of JBoss Hibernate is out.
-Michael
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Friday, June 08, 2007 3:38 PM
To: Rules Users List
Subject: [rules-users] name
I've asked this on dev, thought i'd also ask on user - what's your
opinions on the email below?
Mark
Mark Proctor wrote:
> So it's over a year since we changed the name from Drools to JBoss
> Rules. Personally I really dislike <Vendor Name> + <Generic Name>
> naming schemes; especially so for Open Source projects. It's not the
> vendor prefix I dislike, as that adds weight in corporate brand
> recognition, but the generic postfix - leaving you no choice but to
> refer to the project by the full name "JBoss Rules" in all
> communication and throughout that communication; which I find
> tiresome. Where as ideally, say in a presentation, you introduce the
> project as JBoss + <Strong Name> first and then further references in
> your presentation can just use the shortened <Strong name>; emails on
> the mailing list, being more casual, can just drop to the shortened
> <Strong Name> straight away. It's not just a lazyiness of having to
> use two words, but I feel it makes it generally easier on the ears and
> eyes. With 4.0 coming up we have taken the next steps into the world
> of Declarative programming, so was thinking of JBoss DRules or JBoss
> D-Rules or JBoss drules - allowing the DRules to be used standalone to
> refer to the project in more casual communication. Anyone have any
> thoughts on a year of the "JBoss Rules" name?
>
> Mark
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
18 years, 6 months
name
by Mark Proctor
I've asked this on dev, thought i'd also ask on user - what's your
opinions on the email below?
Mark
Mark Proctor wrote:
> So it's over a year since we changed the name from Drools to JBoss
> Rules. Personally I really dislike <Vendor Name> + <Generic Name>
> naming schemes; especially so for Open Source projects. It's not the
> vendor prefix I dislike, as that adds weight in corporate brand
> recognition, but the generic postfix - leaving you no choice but to
> refer to the project by the full name "JBoss Rules" in all
> communication and throughout that communication; which I find
> tiresome. Where as ideally, say in a presentation, you introduce the
> project as JBoss + <Strong Name> first and then further references in
> your presentation can just use the shortened <Strong name>; emails on
> the mailing list, being more casual, can just drop to the shortened
> <Strong Name> straight away. It's not just a lazyiness of having to
> use two words, but I feel it makes it generally easier on the ears and
> eyes. With 4.0 coming up we have taken the next steps into the world
> of Declarative programming, so was thinking of JBoss DRules or JBoss
> D-Rules or JBoss drules - allowing the DRules to be used standalone to
> refer to the project in more casual communication. Anyone have any
> thoughts on a year of the "JBoss Rules" name?
>
> Mark
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
18 years, 6 months
4.0 Release date
by Subramanya, Hareesh
Anybody know when 4.0 is expected to be released officially?
I am looking for a tentative time frame at least, so that we can decide
if we need to schedule time for a drools update in the current release
cycle.
Thanks,
Hareesh
====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.
18 years, 6 months
Problem loading drl with dsl
by Chris Mathrusse
JBoss Rules 4.0MR2
I'm trying to load my rules using a drl file with a dsl file. I've based this
upon the conway example. The problem is each time I start my application and
load the files I get the following error message:
Caused by:
org.drools.rule.InvalidRulePackage: [8,0]: unknown:8:0 required (...)+ loop
(decision=2) did not match anything; token=[@18,159:166='expander',<34>,8:0]
at org.drools.rule.Package.checkValidity(Package.java:368)
Because I am using Spring Modules and configuring JBoss Rules with the Jsr94
packages I am having to specify the dsl file as a property passed into the
DefaultRuleSource. The key is the name of the dsl expander (order-release.dsl)
and the value is the contents of the file as a String.
Here is my order-release.drl file:
package com.sybase.it.cosmos.rules
expander order-release.dsl
import com.sybase.it.cosmos.rules.logic.Order;
# The Order's total Amount exceeds the Maximum allowable amount
rule "Maximum Order Amount Exceeded"
salience 9800
when
An Order amount exceeds 100000
then
Manually release the Order with code "AR_001"
end
Here is my order-release.dsl file:
[condition][order]An Order amount exceeds {number} =order : Order( releasable ==
true , amount >= {number})
[consequence][order]Manually release the Order with code
"{resourceCode}"=order.setForManualRelease("{resourceCode}");retract(order);
[consequence][order]Release the order=order.setForAutoRelease();retract(order);
18 years, 6 months
Need help in finding which expression in the rule failed
by Ashwini Joshi
Hi,
Suppose I have a rule as
rule "Rule1"
when
Message( message == "Hello" ) || Message( status == 0 )
then
System.out.println("then executed");
End
Then is there a way to find out which condition is satisfied? I.e. whether
message was equal to "Hello" or status was 0.
We are writing alert generation using rules engine, we need to specify in
the alert that because of which condition alert gets generated.
We are having multiple clauses in a single rule. So what is the correct way
to find the clause because of which alert is generated. We cannot keep them
in separate rule because we need to consider and\or conditions between these
clauses.
Thanks,
Ashwini
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.
18 years, 6 months
BRMS - How to access rules packages driectly from the repository - Rule Base Deployment
by philokratis
We need to load rule packages (snapshots) directly from the repository,
preferably from a jmx service in order
build a rulebase and cache the rulebase in JNDI.
How can we access a package snapshot directly from the repository ?
Is there another way besides downloading the package through http request?
Michael, regarding the rulebase caching is the use of JNDI the reccomended
approach
What are the plans for BRMS regarding this part?
Thank you
18 years, 6 months
Problem Either in JBRMS or RunTime System !!!
by Rajesh_Kumar
Hi drools team,
I am using JBRMS for creating the rules.
I am able to download the binary package from JBRMS,and also able to use
it in the Runtime System,but when I try to
use three packages at a time it generates an error as mentioned below.My
Runtime system works fine when I use only two packages.Could you please
suggest, what's going wrong.I have checked this error on rules-user list
and someone got a reply
like it seems to be a bug from Edson Tirelli .
Link:::
http://lists.jboss.org/pipermail/rules-users/2007-May/001353.html
18:48:02,688 INFO [STDOUT] java.lang.NullPointerException
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.CompositeObjectSinkAdapter$HashKey.setValue(CompositeO
bjectSinkAdapter.java:501)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.CompositeObjectSinkAdapter$HashKey.<init>(CompositeObj
ectSinkAdapter.java:441)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.CompositeObjectSinkAdapter.hashSinks(CompositeObjectSi
nkAdapter.java:158)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.CompositeObjectSinkAdapter.addObjectSink(CompositeObje
ctSinkAdapter.java:72)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.ObjectSource.addObjectSink(ObjectSource.java:104)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.ObjectTypeNode.addObjectSink(ObjectTypeNode.java:313)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.AlphaNode.attach(AlphaNode.java:116)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.BuildUtils.attachNode(BuildUtils.java:129)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.PatternBuilder.attachAlphaNodes(PatternBuilder
.java:118)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.ja
va:70)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.PatternBuilder.build(PatternBuilder.java:54)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElem
entBuilder.java:111)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.
java:69)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder
.java:143)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.ja
va:108)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:112)
18:48:02,688 INFO [STDOUT] at
org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:266)
18:48:02,688 INFO [STDOUT] at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:294)
18:48:02,688 INFO [STDOUT] at
com.aha.processor.RulesProcessor.readRules(RulesProcessor.java:61)
18:48:02,688 INFO [STDOUT] at
com.aha.processor.RulesProcessor.<init>(RulesProcessor.java:40)
18:48:02,688 INFO [STDOUT] at
com.aha.processor.RulesProcessor.getInstance(RulesProcessor.java:50)
18:48:02,688 INFO [STDOUT] at
com.aha.servlet.MCPServlet.process(MCPServlet.java:95)
18:48:02,688 INFO [STDOUT] at
com.aha.servlet.MCPServlet.execute(MCPServlet.java:78)
18:48:02,688 INFO [STDOUT] at
com.aha.servlet.MCPServlet.doGet(MCPServlet.java:41)
18:48:02,688 INFO [STDOUT] at
com.aha.servlet.MCPServlet.doPost(MCPServlet.java:56)
18:48:02,688 INFO [STDOUT] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
18:48:02,688 INFO [STDOUT] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
18:48:02,688 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
18:48:02,688 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
18:48:02,720 INFO [STDOUT] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
r.java:81)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
18:48:02,720 INFO [STDOUT] at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipa
lValve.java:39)
18:48:02,720 INFO [STDOUT] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:153)
18:48:02,720 INFO [STDOUT] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
ava:59)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
18:48:02,720 INFO [STDOUT] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
18:48:02,720 INFO [STDOUT] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
6)
18:48:02,720 INFO [STDOUT] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:744)
18:48:02,720 INFO [STDOUT] at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
18:48:02,720 INFO [STDOUT] at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker
Thread.java:112)
18:48:02,720 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
My Rule Engine code snippet is as follows:::
private RulesProcessor(){
ruleBase = RuleBaseFactory.newRuleBase();
System.out.println("rule base constructor fired!!");
try{
FileInputStream fileStream = new FileInputStream(
"C:/drools/SessionRule.pkg" );
readRules(ruleBase,fileStream);
fileStream = null;
fileStream = new FileInputStream(
"C:/drools/WorkFlowRulesPackage.pkg" );
readRules(ruleBase,fileStream);
fileStream = null;
fileStream = new FileInputStream(
"C:/drools/AuthorizationPackage.pkg" );
readRules(ruleBase,fileStream);
fileStream = null;
}
catch(Exception e){
e.printStackTrace();
}
}
private void readRules(RuleBase ruleBase,InputStream inputStream){
ObjectInputStream objectInputStream = null;
Object objPackage = null;
try {
objectInputStream = new
ObjectInputStream(inputStream);
objPackage = objectInputStream.readObject();
ruleBase.addPackage((Package)objPackage);
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally{
try{
objectInputStream.close();
inputStream.close();
}catch (IOException e){
e.printStackTrace();
}
}
}
18 years, 6 months
Decision tables
by kranthikumar dalai
Hi,
I am using Decision table in drools. But it is not giving any output. I
am doing the correct one or not.
The code
*RuleSet* *com.sample* * * * * *Import* *
com.sample.Paternity.RuleBean;* * * *Notes* *This decision table is a
Paternity decision table* * * ** ** ** ** ** *RuleTablefor Paternity* * *
* * * * CONDITION CONDITION CONDITION ACTION * * * * RuleBean(status
== "$param") RuleBean(role =="$param") RuleBean(NoOfDays == $param)
System.out.println("Kranthis"); *Paternity Rules* *Status* *Role* *NoOfDays*
*Print out message?* * * *Married* *Permanent* *2* *Kranthi3* * * * * * * *
* * *
The following the my code
for
Paternity.java
*
public* *class* Paternity {
*public* *static* *final* *void* main(String[] args) {
*try* {
RuleBase ruleBase = *readDecisionTable*();
WorkingMemory workingMemory = ruleBase.newStatefulSession();
//go !
RuleBean rule=*new* RuleBean("Married","Permanent",2);
System.*out*.println("Kranthi1");
workingMemory.assertObject(rule);
System.*out*.println("kranthi2");
workingMemory.fireAllRules();
} *catch* (Throwable t) {
t.printStackTrace();
}
}
*private* *static* RuleBase readDecisionTable() *throws* Exception {
//read in the source
*final* SpreadsheetCompiler converter = *new* SpreadsheetCompiler();
*final* String drl = converter.compile( "/Sample.xls", InputType.*XLS* );
PackageBuilder builder = *new* PackageBuilder();
builder.addPackageFromDrl( *new* StringReader( drl ) );
Package pkg = builder.getPackage();
RuleBase ruleBase = RuleBaseFactory.*newRuleBase*();
ruleBase.addPackage( pkg );
*return* ruleBase;
}
}
and the following is my RuleBean.java
*
package* com.sample;
*
import* com.sample.Paternity;
*
public* *class* RuleBean{
*private* String status;
*private* String role;
*public* *int* NoOfDays;
*public* RuleBean(String status,String role,*int* NoOfDays) {
System.*out*.println("kranthiobj");
*this*.status = status;
*this*.role = role;
*this*.NoOfDays = NoOfDays;
}
*public* *int* getNoOfDays() {
*return* NoOfDays;
}
*public* *void* setNoOfDays(*int* noOfDays) {
NoOfDays = noOfDays;
}
*public* String getRole() {
*return* role;
}
*public* *void* setRole(String role) {
*this*.role = role;
}
*public* String getStatus() {
*return* status;
}
*public* *void* setStatus(String status) {
*this*.status = status;
}
}
18 years, 6 months
comparison of two variables on same object, JBoss Rules 3.0.6
by Wagner Rick - rwagne
Edson,
Thanks much, but regrettably I'm a 3.0.6 user for now. Can you offer
any tips for that version?
(Sorry to be backward looking-- I'll upgrade!)
Thanks,
Rick
>Assuming you are using 4.0, just bind one and compare to the other:
>
>rule XXX
>when
> Tree( $new : newNumberLeaves, oldNumberLeaves > $new )
>then
> // do something
>end
*************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally privileged.
If the reader of this message is not 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 resend this
communication to the sender and delete the original message or any copy
of it from your computer system.
Thank you.
*************************************************************************
18 years, 6 months