Re: [rules-users] startsWith function

2011-08-08 Thread Mattias Nilsson Grip
aftab wrote: I want to define rules for below function, private boolean isFixedNumber(Call call){ if(call.getCalledNumber().startsWith(01) || call.getCalledNumber().startsWith(02) || call.getCalledNumber().startsWith(03) ){ return true; }

Re: [rules-users] Help needed

2011-08-08 Thread Mattias Nilsson Grip
prasad.pbc wrote: Hi Guys, Iam using Eclipse tool for writing drl , i have written drl . Then i have written an ant script to convert this drl to PKG . i have used drools5.1.1.jars. i was sucessfully convert drl to pkg. knowledgeBuilder kbuilder =

[rules-users] a newbi question

2011-08-08 Thread wutongjoe
hello all, I am a newbi on Drools and started my test work with a modified exapmle included in drools v4.0.7.The compiled drl from a very simple modified xls file is like the follwing : --code--- package org.drools.examples.decisiontable; #generated from

Re: [rules-users] a newbi question

2011-08-08 Thread Wolfgang Laun
On 8 August 2011 10:02, wutongjoe wutong...@gmail.com wrote: hello all, I am a newbi on Drools and started my test work with a modified exapmle included in drools v4.0.7.The compiled drl from a very simple modified xls file is like the follwing :

Re: [rules-users] org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[

2011-08-08 Thread Mattias Nilsson Grip
bhavindalal wrote: Hello, I am new to Drools. On starting to execute a simple program, eclipse gives the following stacktrace as error. I even included the org.eclipse.jdt that comes with eclipse, but it is still giving me error. Anybody please suggest the problem. I am using Drools 5.0

[rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread snehils
Hi, I am new in Drools. I am using Drools version 5.1.0 My requirement is kind of request response, where I have to perform some checks for the request and respond the result. Hence, I decided to go with stateless knowledge session. I have prepared .DRL file and it contains set of rules. When

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread Wolfgang Laun
Basically you could do rule RL1 when Request( type == Rq1,... ) which limits the rule to Requests of this type. -W On 8 August 2011 10:23, snehils sneh...@gmail.com wrote: Hi, I am new in Drools. I am using Drools version 5.1.0 My requirement is kind of request response, where I have

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread Esteban Aliverti
You can have a map of kbases containing the specific rules. When a request arrives, you get the proper kbase from the map and create a ksession from it. Another way could be to use Control Objects in your rules. Best Regards, Esteban Aliverti -

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread snehils
I thought of doing same but this will become slow when number of rules are more (100 or 200 rules). The given condition will be checked in each rule. -- View this message in context: http://drools.46999.n3.nabble.com/Fire-Rule-in-Stateless-Knowledge-Session-tp3234893p3234939.html Sent from the

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread Mattias Nilsson Grip
snehils wrote: Hi, I am new in Drools. I am using Drools version 5.1.0 My requirement is kind of request response, where I have to perform some checks for the request and respond the result. Hence, I decided to go with stateless knowledge session. I have prepared .DRL file and it

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread Esteban Aliverti
Because of node sharing, it shouldn't be that bad if you use the Request() constraint as the first conditional element of your rules. You must also use always the same order when checking for more than 1 request. For example: rule Rule1 when Request ( type == Rq1 || type == Rq2) ... then

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread Mattias Nilsson Grip
snehils wrote: I thought of doing same but this will become slow when number of rules are more (100 or 200 rules). The given condition will be checked in each rule. The Rete algorithm will make sure that this does not become slow when number of rules increases. Multiple rules with the same

[rules-users] Drools 4.0.7 compatible with Jboss 3.2.7

2011-08-08 Thread Dibya Ranjan
Thanks for the update. Would like to know if Drools version 4.0.7 is compatible with J-boss version 3.2.7. /BR Dibya -- View this message in context: http://drools.46999.n3.nabble.com/Drools5-2-2-integration-with-scala2-9-0-1-tp3229566p3231390.html Sent from the Drools: User forum mailing

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread snehils
Thanks Mattias... Now Wolfgang's solution will work Mattias Nilsson Grip wrote: The Rete algorithm will make sure that this does not become slow when number of rules increases. Multiple rules with the same condition will only result in one node in the Rete tree. I.e. each unique condition

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread snehils
Can you give some reference link ot code snippet? that would be helpful :) Esteban wrote: You can have a map of kbases containing the specific rules. When a request arrives, you get the proper kbase from the map and create a ksession from it. Another way could be to use Control Objects

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread snehils
Is there any disadvantage switching in stateful session? Mattias Nilsson Grip wrote: If you switch to stateful session instead of stateless you could use agenda groups to achieve something similar. See Drools Expert user guide for details on how to use agenda groups. /Mattias --

[rules-users] RuleAgent - loading rules help ?

2011-08-08 Thread Ivan Peshev ( M-Tel )
Hello, Is there a way to tell RuleAgent to load rules not only from remote URL ? i.e. some rules from URL and some rules from LOCAL path on my computer. (e.g.: c:\some\folder\rule.drl) Or if it's not possible exactly that way is there another way to have some rules loaded from URLs and some

Re: [rules-users] Fire Rule in Stateless Knowledge Session

2011-08-08 Thread Mattias Nilsson Grip
snehils wrote: Is there any disadvantage switching in stateful session? If you switch to stateful sessions you have to ensure that you call the dispose-method on your session when you are done with it. Otherwise you could get a memory leak. Other than that I can't think of any disadvantage.

Re: [rules-users] RuleAgent - loading rules help ?

2011-08-08 Thread Swindells, Thomas
Have you tried just using a file url? From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Ivan Peshev ( M-Tel ) Sent: 08 August 2011 11:04 To: rules-users@lists.jboss.org Subject: [rules-users] RuleAgent - loading rules help ? Hello, Is there a

Re: [rules-users] RuleAgent - loading rules help ?

2011-08-08 Thread Esteban Aliverti
Which version of drools are you using? If you are using a change-set to feed you kagent, then you can use other protocols rather than http to get your rules from: file://, classpath:// Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com

Re: [rules-users] RuleAgent - loading rules help ?

2011-08-08 Thread Ivan Peshev ( M-Tel )
Here is some more details: * Currently our system loads rules from Guvnor installed on a server (version 5.0.0) The problem is that there is no way to debug remotely the rules which are already deployed on Guvnor. So I was wondering what if I load the rule I need to debug from my local

Re: [rules-users] Drools Execution Server memory leak?

2011-08-08 Thread fx242
Hi, We are having the same problem with a similar setup (drools 5.2.0 Final) using stateless sessions and camel integration, using a KB with ~3000 rules. Session memory is never reclaimed, and after some hours we got an out of memory error. We still dont know the cause, but the profiler shows

Re: [rules-users] Drools5.2.2 integration with scala2.9.0.1

2011-08-08 Thread puneet.java
Thank Mario, Thank a lot for the reply. The solution was really helpful and I am able to run my code. I would also like to know is there any guideline or document to debug these kind of errors, since it doesn't show any problem at compile time or runtime. Thanks, Puneet -- View this message in

Re: [rules-users] Guvnor - Unable to load a required class !! Help

2011-08-08 Thread John
Is com.employee.Fire listed in the Configuration: Imported types box on the main screen for your package in Guvnor? -John -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Guvnor-Unable-to-load-a-required-class-Help-tp3230887p3236720.html Sent from the Drools: User

[rules-users] Lock-on-active and ruleflow-group

2011-08-08 Thread bitter
I have three rules: rule First rule salience 20 ruleflow-group rfs_1 lock-on-active true when $c: Car(color == red) then $c.setPrice(1); update($c); end rule Second rule salience 25

[rules-users] Off to a very bad start - please help

2011-08-08 Thread ronalbury
I downloaded droosljbpm-tools-distribution-5.2.0.Final and installed the plugins in eclipse. I downloaded droolsjbpm-integration-distribution-5.2.0.Final and imported the example project into eclipse (Helios) per instructions in the ReadMeDroolsjbpmintegration.txt file. I used the first

Re: [rules-users] Off to a very bad start - please help

2011-08-08 Thread ronalbury
I wasn't clear. The resource files copied over as well as the Java files. However, the resources (and subdirectories) do not show up at the outer level, as they do on the imported project. http://drools.46999.n3.nabble.com/file/n3237310/DroolsProblem.png -- View this message in context:

Re: [rules-users] Off to a very bad start - please help

2011-08-08 Thread Mauricio Salatino
You should try with m2Eclipse, it will be easier to handle the dependencies. Maven will take care of the dependencies and the project structure showing you all the resources and adding all of them in the class path. If you don't want to use maven , you should provide all the drools dependencies to

Re: [rules-users] stopping the rule sequence execution

2011-08-08 Thread Sachin Thapa
You can retract the object and it will stop firing rules. Let me know if that doesnt work. Regards, Sachin Sent from my iPhone On Aug 9, 2011, at 12:12 AM, prasad6779 [via Drools] ml-node+3237751-938366868-8...@n3.nabble.com wrote: Hi All, please help me, i am having 10 rules i