Re: [rules-users] Can drools use to validata a large no of facts?

2007-03-29 Thread Michael Neale

thats a bit of a "how long is a piece of string" question really.
I would say that it may or may not be a problem ;)

For really large volumes of data, people normally may filter it if they have
some basic criteria they can use, and the data comes from a database etc.

Relational databases are good as fishing for data from a large set, they are
designed for that specifically. Havign said that, the "from" keyword
in 3.1will certainly help with that, as you can have a query embedded
that pulls
data from a datasource only when needed.

On 3/29/07, vista2007 <[EMAIL PROTECTED]> wrote:



I want to validate a large volume of data which is asserted to the working
as
fcats. Is this feasiable for an application ? Is there a way to implement
this efficiently and without memory problums ?
--
View this message in context:
http://www.nabble.com/Can--drools-use-to-validata-a-large-no-of-facts--tf3485259.html#a9729756
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] New bee writing rules

2007-03-29 Thread miro

I have a n object which has a method which returns java.util.Map .
Is it easy to implement a rule which calls the gettter method on this object
for the map and get the value for a specified key and check condition on
that value ?
Example  
class MyObject {
 private Map properties;
public Map getProperties(){
   return properties;
   }

public void setProperties(Map aMap){
   this.properties=aMap;
   }


Now  the rule I need is 

   MyObject aObject= new MyObject();

  return  (
aObject.getPorperties().get("price").toString.equals("aproperty"))

} 

Can this code be easily implemented in a drl file  and  what is with the
eval  ? 
-- 
View this message in context: 
http://www.nabble.com/New-bee-writing-rules-tf3488367.html#a9740856
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] new bee writing rules

2007-03-29 Thread temp temp
I have a n object which has a method which returns java.util.Map .  
  Is it easy to implement a rule which calls the gettter method on  this object 
for the map and get the value for a specified key and check  condition on that 
value ?  
  Example
  class MyObject {  
   private Map properties;  
  public Map getProperties(){  
 return properties;  
 }  

  public void setProperties(Map aMap){  
 this.properties=aMap;  
 }  


  Now  the rule I need is   

 MyObject aObject= new MyObject();  

return  ( 
aObject.getPorperties().get("price").toString.equals("aproperty"))  

  }
  
  Is this possible to write in a drl file  and is this a good  approach also is 
using eval in a drl file is not a good solution ie it  has any problems ?
  Thanks 
  Miro
  
  
 
-
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools fact counts...

2007-03-29 Thread Edson Tirelli

  If you are using 3.1M1 or later (trunk), you can do:

rule xyz
when
   Treatment( $id : id, status == "pending" )
   ArrayList( size >= 70 ) from ( Treatment( id == $id, status == "paid" )
)
then
   assert( new Rejection( "reason" ) )
end

  If you are using 3.0.x, you will need 2 rules. One rule will count the
occurrences and the other will check if total is greater than 70.

  []s
  Edson




2007/3/29, Jim Majure <[EMAIL PROTECTED]>:


I have what I think is a very simple rule to implement, but I can't find a
way to do it without "cheating" by using an eval/function. Here's the basic
rule in English:
 **

Reject a claim if it contains a treatment that has already been claimed more 
than 70 times
in the same calendar month. 


In other words, I need to count the number of instances of the treatment
that have already been paid.

Assume for the sake of this discussion, my facts are instances of the
Treatment class.

If I replace "70" with, say, "2" in this rule I could do this:
 **

rule
when
Treatment(id=="t1", status=="pending")
Treatment(id=="t1", status=="paid")
Treatment(id=="t1", status=="paid")
then
assert ( new Rejection("reason"));
end

Unfortunately, I can't simply replace "70" with "2", and using the same
strategy to check for 70 instances doesn't seem quite right.

Am I missing something very simple here? Are there standard strategies to
deal with this type of rule?

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users





--
 Edson Tirelli
 Software Engineer - JBoss Rules Core Developer
 Office: +55 11 3124-6000
 Mobile: +55 11 9218-4151
 JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools fact counts...

2007-03-29 Thread Jim Majure
I have what I think is a very simple rule to implement, but I can't find a way 
to do it without "cheating" by using an eval/function. Here's the basic rule in 
English: 


Reject a claim if it contains a treatment that has already been claimed more 
than 70 times 
in the same calendar month. 

In other words, I need to count the number of instances of the treatment that 
have already been paid. 

Assume for the sake of this discussion, my facts are instances of the Treatment 
class. 

If I replace "70" with, say, "2" in this rule I could do this: 


rule
when
Treatment(id=="t1", status=="pending")
Treatment(id=="t1", status=="paid")
Treatment(id=="t1", status=="paid")
then
assert ( new Rejection("reason"));
end

Unfortunately, I can't simply replace "70" with "2", and using the same 
strategy to check for 70 instances doesn't seem quite right. 

Am I missing something very simple here? Are there standard strategies to deal 
with this type of rule?
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] jsr94

2007-03-29 Thread Mark Proctor

jsr94 is documented in the manual and drools-jsr94 is a jar in the download.

[EMAIL PROTECTED] wrote:

hello,
I want to deploy the jsr-94 specific in the rule engine JBoss Rules 
the problem I didn't find the specification for drools I find it for Jess

Please I need your help
Best regard
Ismail
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

  


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users]The Rule is not working with milestone

2007-03-29 Thread Edson Tirelli

  Basha

  If the problem is that it is retracting all your objects, then the engine
is working fine. What changed from the 3.0.x branch to the milestone is that
in 3.0.x branch, the same object would not match more than one pattern,
while in the milestone, the default is now to allow the same object to match
more than one pattern.

  So, for the rule to work as you want, you need to either set an option
for the engine to work as it worked in 3.0.x or add a constraint to the
rule.

a) If you prefer to set the option, you may set the system property "
drools.removeIdentities = true", or call the following method in the
RuleBaseConfiguration:

RuleBaseConfiguration.setRemoveIdentities(boolean removeIdentities);

b) If you prefer to change your rule, you can do this:

$provAddress:ProviderAddress( $addType : addressTypeCode, $pPI :
primaryPracticeIndicator )

$provAdd:ProviderAddress( this != $provAddress, addressTypeCode == $addType,
$pp:primaryPracticeIndicator == $pPI )

  Regards,
 Edson



2007/3/29, Sikkandar Nawabjan <[EMAIL PROTECTED]>:


*

Hi,

The below rule for dublicate checking is working fine with 3.0.5 but not
with milestone version? Is that a problem with milesone?

rule
* "rule01"

*when*

$provAddress:ProviderAddress( $addType : addressTypeCode, $pPI :
primaryPracticeIndicator )

$provAdd:ProviderAddress( addressTypeCode == $addType,
$pp:primaryPracticeIndicator == $pPI )

*then*

System.out.println(
"Hi"+$addType+" "+$pPI+"::"+$pp);

*retract*($provAddress);*

end



Basha
*

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users





--
 Edson Tirelli
 Software Engineer - JBoss Rules Core Developer
 Office: +55 11 3124-6000
 Mobile: +55 11 9218-4151
 JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problem with \" while compiling DRL

2007-03-29 Thread Edson Tirelli

 Ok, fixed that in 3.0.x branch.

 If you update and build, you shall not have the problem anymore.

  Regards,
Edson

2007/3/28, Edson Tirelli <[EMAIL PROTECTED]>:


Cedric,

Don't mind. I already opened the ticket:

http://jira.jboss.com/jira/browse/JBRULES-757

[]s
Edson

2007/3/28, Edson Tirelli <[EMAIL PROTECTED]>:
>
>
>   Cedric
>
>   Yes, seems a lexer problem. Can you please open a JIRA? We will fix it
> for the next maintenance release.
>
>Thank you
> Edson
>
> 2007/3/28, D'Inca Cedric < [EMAIL PROTECTED]>:
> >
> >  Hi everyone,
> >
> >
> >
> > I am currently experimentating troubles compiling a DRL file with a \"
> > character in it.
> >
> > I used a XLS decision table that, once compiled, gave me a DRL. The
> > following lines are extracted from it.
> >
> >
> >
> > #From row number: 14
> >
> > rule "Exemple 1 2006 10 10_14"
> >
> >
> >
> >   salience 65522
> >
> >   when
> >
> > Ctx:MyObject()
> >
> > eval(Ctx.GetPrp("TEST").getValue().equals("GER"))
> >
> >   then
> >
> > Ctx.SetPrp("TRUC").setValue("test char \" test");
> >
> > end
> >
> >
> >
> > #From row number: 15
> >
> >
> >
> > The problem is that when compiled, an error is generated
> >
> >
> >
> > Unknown:0-1 mismatched token: [EMAIL PROTECTED],0,0='',<-1>,0:-1];
> > expecting type 'end'
> >
> >
> >
> > If I modify the decision table to put
> >
> >
> >
> > Ctx.SetPrp("TRUC").setValue("test char " test");
> >
> >
> >
> > The result is the same
> >
> >
> >
> > Unknown:0-1 mismatched token: [EMAIL PROTECTED],0,0='',<-1>,0:-1];
> > expecting type 'end'
> >
> >
> >
> > So it means that \" is not understood, however, if I put \z, I get the
> > following error:
> >
> >
> >
> > Rule compilation error Invalid escape sequence (valid ones are \b \t
> > \n \f \r \" \' \\)
> >
> >
> >
> > Where it is written that \" should be understood.
> >
> >
> >
> > Any idea?
> >
> >
> >
> > Greetings,
> >
> >
> >
> > Cédric D'INCA
> >
> > ___
> > rules-users mailing list
> > rules-users@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
>
> --
>   Edson Tirelli
>   Software Engineer - JBoss Rules Core Developer
>   Office: +55 11 3124-6000
>   Mobile: +55 11 9218-4151
>   JBoss, a division of Red Hat @ www.jboss.com




--
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3124-6000
  Mobile: +55 11 9218-4151
  JBoss, a division of Red Hat @ www.jboss.com





--
 Edson Tirelli
 Software Engineer - JBoss Rules Core Developer
 Office: +55 11 3124-6000
 Mobile: +55 11 9218-4151
 JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] comparisons on Java primitive wrapper class types

2007-03-29 Thread Edson Tirelli

  Yes, this should not be raising errors.

  Michael,

  What was the conclusion of the discussion about null handling?

  Thanks,
   Edson


2007/3/28, wasabifan <[EMAIL PROTECTED]>:



class MyObject {
  private Integer used;
  private Integer notUsed;
  // public setters/getters...
}

rule "1"
  when
MyObject(used == 1)
  then
// do something
end

rule "2"
  when
UnrelatedObject(data == 5)
MyObject(notUsed == 2)
  then
// do something else
end

Basically, I am trying to create JUnit test cases to test each of the
rules
functionality.  So I would instantiate and object, set the required data
to
fire a rule, assert the object and fire all rules.  So when setting
MyObject.used = 1, then asserting that fact...it appears that rule 2 would
complain that notUsed is null (even though I do not have an asserted fact
where UnrelatedObject(data == 5).

Does this make sense?  I know this is sort of pseudo code thrown together
quickly, but I think that explains what I was experiencing.  If not, I can
go back to get some of the actual code, but that would be much longer.

Thanks,
Bryan


Edson Tirelli-3 wrote:
>
> Can you please provide one example for us to understand better the
> case?
>

--
View this message in context:
http://www.nabble.com/comparisons-on-Java-primitive-wrapper-class-types-tf3481733.html#a9721787
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users





--
 Edson Tirelli
 Software Engineer - JBoss Rules Core Developer
 Office: +55 11 3124-6000
 Mobile: +55 11 9218-4151
 JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Help: How to implement drools to validate a large volume of data ?

2007-03-29 Thread gabriel quennesson
I resorted to modify the JVM's memory parameters (-Xmsn  and -Xmxn on 
Sun's JVM).
Tweaking these will solve most OutOfMemoryException errors. It is not 
allways an option, however.


Milinda Jayakody a écrit :

Hi
I want to validate a large volume of data using drools. But I found 
that when i asserted a large no of objects to the working memory it 
results an out of memory error. Can anyone help me how to implement 
drools efficiently to validate a large no of facts?

Thank You
 
 



Sucker-punch spam 
 
with award-winning protection.
Try the free Yahoo! Mail Beta. 
 




___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
  


--

___
*Gabriel Quennesson *| CTC/I | *SEAM*
Int :* *7 906 6910 | Ext: 04 73 64 69 10
[EMAIL PROTECTED] 



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Help: How to implement drools to validate a large volume of data ?

2007-03-29 Thread Milinda Jayakody
Hi
  I want to validate a large volume of data using drools. But I found that when 
i asserted a large no of objects to the working memory it results an out of 
memory error. Can anyone help me how to implement drools efficiently to 
validate a large no of facts?
  Thank You
   
   

 
-
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Can drools use to validata a large no of facts?

2007-03-29 Thread vista2007

I want to validate a large volume of data which is asserted to the working as
fcats. Is this feasiable for an application ? Is there a way to implement
this efficiently and without memory problums ?
-- 
View this message in context: 
http://www.nabble.com/Can--drools-use-to-validata-a-large-no-of-facts--tf3485259.html#a9729756
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] [EMAIL PROTECTED]

2007-03-29 Thread fakhfaki
hello,
I want to deploy the jsr-94 specific in the rule engine JBoss Rules 
the problem I didn't find the specification for drools I find it for Jess
Please I need your help
Best regard
Ismail
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users