Re: [rules-users] How to traverse the Collection by index

2010-03-08 Thread Swindells, Thomas
One of the big challenges of using drools is thinking declaratively and not the iterative method of normal programming. Your first paragraph actually pretty much sums up your rules nicely. One thing to comment on is that working on collections (using the from keyword) isn't a particularly

[rules-users] API for querying Rules

2010-03-08 Thread Jian Feng Ng
Hi, I am using Drools 5.1.0.M1. I would like to know if there is anymethod or API for querying rules, including namedQuery. Currently I only know how to get the collection of rules from knowledgepackage, but each rule object/class only contains limited information such as 'rule name' and 'package

Re: [rules-users] Problem with date

2010-03-08 Thread Bertrand Grottier
Hello, Ok, I understand the problem. dDeb is indeed a Date type. What is the proper/simplest way to achieve such a comparison ? Thank you in advance for your help. Regards, BenoƮt Date: Thu, 4 Mar 2010 10:01:23 + From: ejdigg...@gmail.com To: rules-users@lists.jboss.org Subject: Re:

Re: [rules-users] Problem with date

2010-03-08 Thread Pavel Tavoda
How was suggested before (in other thread) you can: 1) use getTime() method of Date class which return long and compare 2) use some good library for example Joda time with eval() Pavel 2010/3/8 Bertrand Grottier b_grott...@hotmail.com: Hello, Ok, I understand the problem. dDeb is indeed a

Re: [rules-users] Problem with date

2010-03-08 Thread Enda J Diggins
Maybe something like: rule Prix premier semestre when p1 : Produit( eval(dDeb.isBefore(new Date(2010,1,1) ) ) ) then p1.setPrix( 10 ); update( p1 ); end Obviously you'll have to import whatever type of date you're using and change the call to the constructor to

Re: [rules-users] How to traverse the Collection by index

2010-03-08 Thread Shabbir Dhari
Dear Thomas I got the idea. Thanks alot for quick and detailed response. Ragards, Dhari From: tswinde...@nds.com To: rules-users@lists.jboss.org Date: Mon, 8 Mar 2010 08:16:31 + Subject: Re: [rules-users] How to traverse the Collection by index One of the big challenges of

Re: [rules-users] SAP JCO (Drools)

2010-03-08 Thread Mauricio Salatino
Hi Matthew. Do you have a specific problem? or you just look for someone how already use it? Sounds like if you know SAP data structures and how JCO works you won't have any problems with Drools. 2010/3/8 Young Matthew (4004) matthew.yo...@forsakringskassan.se Searched the mail archives

Re: [rules-users] Problem with date

2010-03-08 Thread Bertrand Grottier
Thank you for your help. I tried the solution you proposed but encountered the following error message: [10,27]: [ERR 101] Line 10:27 no viable alternative at input 'new' in rule Prix premier semestre in pattern Produit [10,36]: [ERR 102] Line 10:36 mismatched input '2010' expecting ')' in rule

Re: [rules-users] Problem with date

2010-03-08 Thread Enda J Diggins
I can only imagine that you have a typo somewhere... Here is some working test code: declare TestOb ddeb : java.util.Date end rule Prix premier semestre when TestOb(eval(ddeb.before(new java.util.Date(2010,3,1) ) ) ) then end ___

[rules-users] Inferencing

2010-03-08 Thread Tim de Jager
Hi everybody, I'm currently doing my bachelor thesis on Rule engines. This includes comapring different Rule engine products. I have set up a small Java program (Conway's game of life) and I'm writing the 'engine' in different Rule engines, while keeping the same GUI,CellGrid etc. I have already

Re: [rules-users] Inheritance-Like Design Question

2010-03-08 Thread Edson Tirelli
Yes, probably so. Eclipse 3.4 and 3.5 should be fine. 2010/3/7 Moe Alkhafaji moe.alkhaf...@medcpu.com OK. I am using the following environment items: Eclipse: 3.3.2. Plugins/Features from the link you provided below. Drools runtime 5.0.1 I still see the same error in Eclipse, however,

Re: [rules-users] Inferencing

2010-03-08 Thread Pavel Tavoda
It's like synchronous vs. asynchronous communication. In reality it's always asynchronous but from top view it appear synchronous. Similar to stateless vs. statefull. Statefull is just series of stateless session where you transfer state from one session to another. Look for Drools statefull

Re: [rules-users] Inferencing

2010-03-08 Thread Edson Tirelli
Hi Tim, That is a nice topic for studies, but be prepared for a tsunami of information and quite a few controversies. :) Regarding your question, I am not sure I completely understand what you mean, but it is important to be clear that generation of code is an orthogonal concern to the

Re: [rules-users] Inferencing

2010-03-08 Thread Edson Tirelli
Interesting analogy, but careful here: Statefull is just series of stateless session where you transfer state from one session to another. Not sure what lead you to think that way, but it is actually the opposite, and trying to explain that will make things REALLY confusing for some. So,

Re: [rules-users] Inferencing

2010-03-08 Thread Pavel Tavoda
Yes you are right but that should be a hidden detail like asynchronous connect is internally synchronous because you are waiting for confirmation packet (but not response) ;-). No way to implement execution without changing global state - am I right? BTW I implemented for one small subproject

[rules-users] Using XmlDumper with .dslr

2010-03-08 Thread tsd-charlie
I need to get the same output as parsing a .DRL file through the XmlDumper but only with a .DSLR file. Seeing as the DSLR creates a DRL for itself I thought this would be theoretically be possible but I have yet to find a way to do this. Any help would be greatly appreciated. Regards, Charlie

Re: [rules-users] Inheritance-Like Design Question

2010-03-08 Thread Moe Alkhafaji
I just want to report that using Eclipse 3.5.2, inheritance worked beautifully! Thanks. Now, I am going to get to the actual problem at hand and try to find a solution. Thanks Edson for all your help in this. 2010/3/8 Edson Tirelli ed.tire...@gmail.com Yes, probably so. Eclipse 3.4 and 3.5

Re: [rules-users] Inferencing

2010-03-08 Thread Wolfgang Laun
Delayed modifications of the facts database are bound to have an impact on the semantics of your rule set (unless, perhaps, you are writing them anticipating this execution cycle). A stateful session effects changes immediately, which, in turn, affects the facts and the agenda immediately.

Re: [rules-users] Inferencing

2010-03-08 Thread Tim de Jager
Thanks a lot everybody for their awnsers, this clarifies it to some extend :)! What I was talking about was indeed the difference between an: interpreted rete engine vs. code generated rete engine vs. the use of no inference engine at all (e.g. Visual Rules). One of the questions that pop

Re: [rules-users] Inferencing

2010-03-08 Thread Greg Barton
Wolfgang, you've basically described the system I've been working on for two years, the Early Alerts System at Southwest Airlines. So yes, Tim, there are real world examples. :) In my case EAS monitors the state of our aircraft fleet (and soon the state of customer bookings) and alerts

Re: [rules-users] Inferencing

2010-03-08 Thread Edson Tirelli
I don't know much about Visual Rules so I will abstain from commenting on that (although I can imagine what they are doing). Regarding interpreted vs code generated RETE, there should be no difference at all on the reasoning process, as the rules would be the same, does not matter if it is

Re: [rules-users] Inferencing

2010-03-08 Thread Greg Barton
You can have code generated rete and still maintain state. Edson mentioned OPSJ, and I can verify that (at least the last time I worked with it 10 years ago) it was code generated and maintained state. http://www.pst.com/opsj.htm http://www.pst.com/opsjbro.htm --- On Mon, 3/8/10, Tim de

Re: [rules-users] Inheritance-Like Design Question

2010-03-08 Thread Edson Tirelli
Thanks for letting us know. Good luck! Edson 2010/3/8 Moe Alkhafaji moe.alkhaf...@medcpu.com I just want to report that using Eclipse 3.5.2, inheritance worked beautifully! Thanks. Now, I am going to get to the actual problem at hand and try to find a solution. Thanks Edson for all

Re: [rules-users] Inferencing

2010-03-08 Thread Tim de Jager
Thank you this explains it. As I see it the Visual Rules approach is very different in that it's more of a flowchart based approach than actual inferencing. And it's clear now that there is no difference in the infreasoning inferencing process either interpreted or compiled. Also interesting

[rules-users] Drools integration with Mysql

2010-03-08 Thread Nilima R
Hello All , I need to integrate Mysql with Drools 1)I have made the following changes in the repositry..xml file PersistenceManager class=org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager param name=url value=jdbc:mysql://localhost.:3306/guvnor_db;create=true/