Re: [rules-users] questions
by abhilashkumar@amritatech.com
Hello :
For the DB calls, i can post one design in a couple of days..
Thanks and Regards,
-- Abhilash.
> Is anyone making database calls in rules from condition side .. if yes
> ... can anyone send me the lines of code which are working ..
>
> if you declare something global it cant be accessed in LHS .. is this
> right ? even though the rule wont throw any error but it wont execute
> the line either .. so something like a dao which i will be using to make
> various calls to database (in LHS) .. if i decalre it global i cant use
> it .. i should not assert it as a fact as it is not a fact .. what's the
> right way of doing it ?
>
> Can somebody please help .. Thanks
>
>
>
>
>
> -----------------------------------------
> *******************************************************************
> *** This email and any files transmitted with it are confidential
> and intended solely for the individual or entity to whom they are
> addressed. If you have received this email in error destroy it
> immediately. ******************************************************
> **************** Wal-Mart Confidential ****************************
> ******************************************
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
17 years, 8 months
mismatched token
by Kolla, Sandeep
Hi All,
This is the DRL
package com.gs.fw.intauto.entitle.rule.facts
import com.gs.fw.intauto.entitle.rule.facts.PersonFacts;
expander entitlement.dsl
rule "Black Berry Rule 1"
salience 1
when
Employee with attribs
- Type is 'Worker'
- Department is 'Internal Automation'
then
Log : "Entitled"
This is The DSL
[when]Employee with attribs=PersonFacts()
[when]- Type is '{type}'=type=='{type}'
[when]- Department is '{department}'=department=='{department}'
[when]- Division is '{division}'=division=='{division}'
[when]- City is '{city}'=city=='{city}'
[when]- User is '{kebrosId}'=kebrosId=='{kebrosId}'
[then]Log : "{message}"=System.out.println("{message}");
I am getting the following error
org.drools.rule.InvalidRulePackage: unknown:1:34 mismatched token:
[@12,34:37='rule',<30>,1:34]; expecting type ID
unknown:2:33 mismatched token: [@28,79:82='rule',<30>,2:33]; expecting
type ID
unknown:9:0 Unable to expand: Employee with attribs. Due to Expression
was not expandable: Employee with attribs
unknown:10:0 Unable to expand: - Type is 'Worker'. Due to Expression
was not expandable: - Type is 'Worker'
unknown:11:0 Unable to expand: - Department is 'Internal Automation'.
Due to Expression was not expandable: - Department is 'Internal
Automation'
unknown:10:2 Unexpected token ','
unknown:16:0 Unable to expand: Log : "Entitled". Due to Expression was
not expandable: Log : "Entitled"
unknown:23:0 Unable to expand: Employee with attribs. Due to Expression
was not expandable: Employee with attribs
unknown:26:0 Unable to expand: - Division is 'Financial Division'. Due
to Expression was not expandable: - Division is 'Financial Division'
unknown:27:0 Unable to expand: - City is 'New York'. Due to Expression
was not expandable: - City is 'New York'
unknown:24:2 Unexpected token ','
unknown:30:0 Unable to expand: Log : "Not Entitled". Due to Expression
was not expandable: Log : "Not Entitled"
I don't see any thing wrong with the DRL and DSL
Can someone help mw with this..
Thanks in advance
Sandeep.
17 years, 8 months
JBoss Rules IDE 3.1-M1 - Validating all *.xls files in source path?
by Bree VanOss
Hi,
I've started looking at the JBoss Rules 3.1-M1 Eclipse plugin to get an idea
of how much migration work I have to look forward to.
The first issue I ran into is that it appears the Drools Builder is
validating every Excel (.xls) file I have in my source path. Is this a
design decision and if so, how can I "hide" non-decision table .xls files
from the Drools builder? I've tried excluding them from the Eclipse Source
Path using a "source exclusion rule", but that didn't seem to work.
Thanks,
Bree
17 years, 8 months
mismatched token error..
by Kolla, Sandeep
Hi All,
This is the DRL
package com.gs.fw.intauto.entitle.rule.facts
import com.gs.fw.intauto.entitle.rule.facts.PersonFacts;
expander entitlement.dsl
rule "Black Berry Rule 1"
salience 1
when
Employee with attribs
- Type is 'Worker'
- Department is 'Internal Automation'
then
Log : "Entitled"
This is The DSL
[when]Employee with attribs=PersonFacts()
[when]- Type is '{type}'=type=='{type}'
[when]- Department is '{department}'=department=='{department}'
[when]- Division is '{division}'=division=='{division}'
[when]- City is '{city}'=city=='{city}'
[when]- User is '{kebrosId}'=kebrosId=='{kebrosId}'
[then]Log : "{message}"=System.out.println("{message}");
I am getting the following error
org.drools.rule.InvalidRulePackage: unknown:1:34 mismatched token:
[@12,34:37='rule',<30>,1:34]; expecting type ID
unknown:2:33 mismatched token: [@28,79:82='rule',<30>,2:33]; expecting
type ID
unknown:9:0 Unable to expand: Employee with attribs. Due to Expression
was not expandable: Employee with attribs
unknown:10:0 Unable to expand: - Type is 'Worker'. Due to Expression
was not expandable: - Type is 'Worker'
unknown:11:0 Unable to expand: - Department is 'Internal Automation'.
Due to Expression was not expandable: - Department is 'Internal
Automation'
unknown:10:2 Unexpected token ','
unknown:16:0 Unable to expand: Log : "Entitled". Due to Expression was
not expandable: Log : "Entitled"
unknown:23:0 Unable to expand: Employee with attribs. Due to Expression
was not expandable: Employee with attribs
unknown:26:0 Unable to expand: - Division is 'Financial Division'. Due
to Expression was not expandable: - Division is 'Financial Division'
unknown:27:0 Unable to expand: - City is 'New York'. Due to Expression
was not expandable: - City is 'New York'
unknown:24:2 Unexpected token ','
unknown:30:0 Unable to expand: Log : "Not Entitled". Due to Expression
was not expandable: Log : "Not Entitled"
I don't see any thing wrong with the DRL and DSL
Can someone help mw with this..
Thanks in advance
Sandeep.
17 years, 8 months
repeat
by fakhfakh ismail
Hello,
First sorry about my bad english
when I run my application the result is repeat * 6
cette personne ismail ne peut pas executer cette activiter
cette personne ismail ne peut pas executer cette activiter
cette personne ismail ne peut pas executer cette activiter
cette personne ismail ne peut pas executer cette activiter
cette personne ismail ne peut pas executer cette activiter
cette personne ismail ne peut pas executer cette activiter
please my Friend i need your help I don't want the result repeat more than one
thank you for your help
Kind regards,
Ismail
---------------------------------
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
17 years, 8 months
help with 3.1 M
by s erel
Hello,
When using the following two rules with an empty working memory both rules
get fired:
===================================
rule rule1
when
not Person(gender == Consts.Unknown)
then
System.out.println("rule1");
end
rule rule2
when
exists Person(gender == Consts.Unknown)
then
System.out.println("rule2");
end
===================================
.
Can anyone help me with this?
Thanks
17 years, 8 months
column contraint + java bean
by lucio@asteriski.com
hi all,
having trouble with Drools 3.x syntax.
currently using one fact in working memory that is a aggregate of many
java beans. However when using the column constraint syntax it does not
seem to allow nested getXXX on the column constraint.
I have it working using predicate but it just seems verbose.
i would like to be able to fire rule when
the table object has a player count > 0 and the Table.getDealer.getFlop()
== null
how is this done on Drools 3.x?
ie.
public class Table{
int playerCount;
Dealer dealer;
Collection players;
....
}
rule "start"
no-loop true
when
table : Table( playerCount > 0 , dealerFlop :
dealer->(dealerFlop.getFlop() == null ) )
then
System.out.println( "start:" + table.getDealer().getFlop() );
end
many thanks
-lp
17 years, 8 months
RE: [rules-users] Tracking non-matches...
by Michael Rhoden
Store all rules with a unique id (rule id) and keep dates of when rules
were put in/out of production. Store your net matches in a database,
after a run, and you can easily pull the delta to show what didn't
"match" on a particular day.
-Michael
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of jdepaul
Sent: Tuesday, April 17, 2007 1:57 PM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Tracking non-matches...
I was hoping for some opinions on the following:
Client will have many rules (about 1000) per RuleBase. The primary goal
is to assert Facts and find Matches in one or more rules. The secondary
goal may be to keep track of those Facts that did not produce Matches.
I was wondering what the best solution may be in this case?!
The benefit in keeping track of the non-matches would be periodic
analysis of the non-matches to discover patterns and perhaps provide
some proactive
monitoring and notification. An additional benefit may be to spot a
trend
and setup additional rules to reduce the number of non-matches.
So I would need to not only spot the no-match condition, I also need to
persist the no-match event in the database for tracking and later
reporting.
One way I can see is to assert a new Match fact the instance a single
rule is matched and then test for the presence/absence of the Match()
fact.
Efficiency and speed are paramount in our case, so I'm wondering if
there is an alternate approach that would work here.
Thanks,
James
--
View this message in context:
http://www.nabble.com/Tracking-non-matches...-tf3596042.html#a10044235
Sent from the drools - user mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
17 years, 8 months