[rules-users] Re: Drools performance issue

2009-06-01 Thread Mark Proctor
Please send these emails to the user list (in cc) so everyone can help, not directly to me. Mark jayadevan m wrote: Hi We have one performance(memory) issue in drools-5 Our Scenario We have 3 entities Trip - Entity representing details about trip Driver - Entity for driver , it

Re: [rules-users] Re: Drools performance issue

2009-06-01 Thread Wolfgang Laun
The first two patterns pair each driver assignment with each trip - which is quite a lot of work to do. (The infix and between the 2nd and 3rd pattern doesn't change this.) Also, the field restriction tripId in ($tid) is not the most efficient way. Try this: rule Assignment Check when $creVo:

[rules-users] DRL - Accessors that take arguments

2009-06-01 Thread Vidya Chandrasekaran
Hi, I am fairly new to Drools and am just getting my feet wet with writing rules. In my work, I have to integrate drools with classes that do not expose all properties via getXXX/ isXXX accessor methods but require a call of the form someMethod(keyvalue). I have been using the MVEL dialect and

[rules-users] rule using sliding window

2009-06-01 Thread Bhushan Bhangale
I am using Drools 5. I am struggling to write rule for this logic - If a stock price changes more than 10% within an hour then report the change. I understand I have to use sliding window feature but unable to write the rule. For example I got an update for IBM stock @ 12:30 for price 100 and

re[rules-users] move hardcoded values in DRL or have constants inside drl

2009-06-01 Thread karthizap
Is there is anyway i can remove hardcoded values in the DRL file? Can I have the constants file(like data dictionary) inside drl/functions. I don't want to refer java constants class directly in drl file and would like to declare and refer those constants inside drl file. -- View this message

Re: re[rules-users] move hardcoded values in DRL or have constants inside drl

2009-06-01 Thread Earnest Dyke
How about adding them as Globals and referencing them that way? You should be able to put them in a map as well in a Global and reference them. Earnie! From: karthizap karthi...@gmail.com To: rules-users@lists.jboss.org Sent: Monday, June 1, 2009 7:14:56 AM

Re: re[rules-users] move hardcoded values in DRL or have constants inside drl

2009-06-01 Thread Wolfgang Laun
But assigning a value to a global isn't straightforward - you can't do it in the declaration. You'll have to do it from the application (or use some dirty hack, in a start-up rule); either way it's separate from the declaration. IMHO, using a Java class with public static final is definitely

Re: re[rules-users] move hardcoded values in DRL or have constants inside drl

2009-06-01 Thread karthizap
Thanks for your reply Earnie. In the following example, don't want to hardcode Person Name value like John in the DRL file. I want to refer it from some other sources(If i refer it from java class file, name value is getting changed quiet often, have to recompile the java source and deploy). My

[rules-users] Resend: A Question about roadmap on integration between Drools and Apache ODE

2009-06-01 Thread 노종극
Title: Samsung Enterprise Portal mySingle Hi. I'm working for Samsung SDS in Korea as a project leader and in contemplation using Apache ODE and Drools. When I was googling I saw your mail as below (Plz see bold) then I have a question about integration between Apache ODE and Drools.

Re: [rules-users] DRL - Accessors that take arguments

2009-06-01 Thread Edson Tirelli
For arbitrary method calls, the only way is to use an eval: VO( eval( computePrice(key) 10 ) ) Although, if you have a method that returns a map, you can use simplified Map syntax: class VO { ... public Map getComputeMap() {...} } Then: VO( computeMap[key] 10 ) []s

Re: re[rules-users] move hardcoded values in DRL or have constants inside drl

2009-06-01 Thread Edson Tirelli
Karthizap, The only thing I could think of for you is to use a function in the DRL to store your name value, but any solution where you change your DRL will require you to redeploy the DRL file (obviously). Since your name changes quite often, can't you make it a fact of your reasoning

Re: [rules-users] rule using sliding window

2009-06-01 Thread Edson Tirelli
Hi The description you have bellow is ambiguous, so I can't give you a definitive answer. But it seems to be that you don't need sliding windows for that. Simple temporal operators will do. Secondly if the window is large and number of records coming in is high then could there be a

Re: Re: [rules-users] Re: Drools performance issue

2009-06-01 Thread jayadevan . m
Thanks W, I tried it out ,But didn't get any performance improvement :( The issue might be that I am inserting too many objects into working memory jayadevan On Jun 1, 2009 3:36pm, Wolfgang Laun wolfgang.l...@gmail.com wrote: The first two patterns pair each driver assignment with each trip -

Re: Re: Re: [rules-users] Re: Drools performance issue

2009-06-01 Thread jayadevan . m
Hi, I noticed something interesting. The issue with memory is happening always while inserting the second set of objects into working memory! Earlier, I was insering the DriverVO's into WM and then inserting the AssignmentsVO, and the system was hanging while inserting the AssignmentsVO.

Re: re[rules-users] move hardcoded values in DRL or have constants inside drl

2009-06-01 Thread Earnest Dyke
Wolfgang makes a good point. However, given the requirement that the value changes and is not truly static, I would recommend something like the following which, if your SearchParm loads the data from a persisted source you could change it's value without any code change. Earnie! package

[rules-users] Clarification regarding the use of Guvnor

2009-06-01 Thread Andrew Nguyen
Hello all, I am a very new Drools user and am trying to expose it as a web- service. Due to my experience with Spring, I went ahead and implemented a basic rule engine and exposed it as a web service via Spring. I am now looking at integrating it with Guvnor to allow non- computer

[rules-users] Web services integration for Drools Flow

2009-06-01 Thread Ajay.Gautam
Hello, I am evaluating a few workflow engines for an up coming project. Drools flow is the first one I am looking at. Question: Is there any existing web services integration with Drools Flow? Specifically: 1. ability to call a service (Similar to Email work item) 2. ability to trigger a flow

Re: Re: Re: [rules-users] Re: Drools performance issue

2009-06-01 Thread Greg Barton
It's happening because the problem is hard. :) It's quadratic on the average number of assignments per driver. i.e. for each driver, you compare all of the assignments to each other, and you must do that for all drivers. So you have ( (num drivers) * (average num assignments)^2 ) firings in

Re: [rules-users] String comparison question

2009-06-01 Thread Armaghan Mahmud
Thanks for your reply Edson. What if I want to test for multiple substrings in different strings? For example, how can I find beta in sentence2? I tried to combine WrapperClass( sentence matches .*Alpha.* sentence2 matches .*Beta*.) but I got errors. Thanks, Armaghan 2009/5/31 Edson Tirelli

Re: [rules-users] String comparison question

2009-06-01 Thread Greg Barton
Try a comma instead of WrapperClass( sentence matches .*Alpha.*, sentence2 matches .*Beta*.) --- On Mon, 6/1/09, Armaghan Mahmud mahmud.armag...@gmail.com wrote: From: Armaghan Mahmud mahmud.armag...@gmail.com Subject: Re: [rules-users] String comparison question To: Rules Users List

[rules-users] ClassCastException for Hibernate entity when rule is fired

2009-06-01 Thread Sobhana
hi, can someone please help with the below issue? Any tips or hints on what could be causing this would be very helpful. We are using Drools 4.0.7 and have a rule which uses a Hibernate entity (SaleEventItem) and its related entity (Inventory). Some times, the SaleEventItem passed as the fact

Re: [rules-users] String comparison question

2009-06-01 Thread Edson Tirelli
Yes, comma in this case is cleaner, but should work too. What error do you see? What version of Drools are you using? []s Edson 2009/6/1 Greg Barton greg_bar...@yahoo.com Try a comma instead of WrapperClass( sentence matches .*Alpha.*, sentence2 matches .*Beta*.) --- On Mon,

Re: [rules-users] Clarification regarding the use of Guvnor

2009-06-01 Thread Steve Ronderos
Andrew, Looks like you are looking for drools-server to expose the rule engine via JSON. I'm not an expert on the subject by any means, but try reading the documentation (embedded in the Guvnor documents

[rules-users] questions on guvnor and drools 5.0

2009-06-01 Thread Garner, Shawn
I was wondering if somebody can help me with some questions: 1) Is there any more detail on how to setup Guvnor with a database? 2) How do you use the test scenarios with complex object structures? -eg Create a fact in working memory that has another Object in it which in turn has a list

[rules-users] The Eclipse JDT Core jar is not in the classpath error

2009-06-01 Thread Chris Richmond
Hello, I am using netbeans and ivy with Drools 5. I have successfully named, published the jars from drools to and could build my port of the stock ticker application in netbeans, but when I try to run it, I get the following error: java.lang.NoClassDefFoundError:

RE: [rules-users] rule using sliding window

2009-06-01 Thread Bhushan Bhangale
Thanks Edson I read about from CE and understand that it can call any external method. In the external method I can write the code to extract the data from database. I googled and found this, where its using hibernate session and that way giving complete flexibility in writing rule on any