[rules-users] How complex can be an expression in given rule...

2009-10-14 Thread Madhav Bhamidipati
Hi, Are the expressions in a rule can be as complex as a regular language support. For example can the expression be as complex as (a == b || (a <= d && a > e )? Where can I find the info. about what sort of expressions supported? Madhav ___ rules-us

[rules-users] 2.0 era projects

2009-10-14 Thread Peter Williams
Does anyone have links to "model" projects built with the 2.x era drools system? I want to discover what was "high end" and "advanced" at that time (or... how did folks manage to extend the framework of that day to build more "advanced" uses of the engine)? __

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Wolfgang Laun
If you are using MVEL in rules, you must declare it, wherever it is used, in each rule. -W 2009/10/14 Chris Richmond > Great….. > > > > > > So, can I simply switch the dialect to not use MVEL? > > > > Chris > > > > > > > -- > > *From:* rules-users-boun...@lists.jbos

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Chris Richmond
Great... So, can I simply switch the dialect to not use MVEL? Chris _ From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: Wednesday, October 14, 2009 8:50 AM To: Rules Users List Subject: Re: [rules-us

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Wolfgang Laun
I've used functions with Drools 5, but not with MVEL. A recent thread seemed to indicate a problem with MVEL for functions, though. What you show of your code appears to be OK. -W On Wed, Oct 14, 2009 at 8:35 PM, Chris Richmond wrote: > Yeah..more fun with functions. I have the following funct

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Chris Richmond
Yeah..more fun with functions. I have the following function function String getMyValue(){ return "value 1"; } I have declared it at the top of the rule file right after all imports and dialect statement but before any rules global Services services; global String currentProfilie; # setup dia

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Chris Richmond
Hmmm..good idea. Now if I can get functions to work. :-) Thanks, Chris _ From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: Wednesday, October 14, 2009 8:15 AM To: Rules Users List Subject: Re: [rules-user

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Wolfgang Laun
You could let the "user" write some functions such as function String parFoo(){ return "foo42"; } and evaluate them in a rule firing with high priority on eval(true). -W 2009/10/14 Chris Richmond > Hmm… > > > > Well..I have this rule file and it seems like a darn convenient place to > set

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Chris Richmond
Hmm. Well..I have this rule file and it seems like a darn convenient place to set some configuration settings so the user could change them in the plain text file. Otherwise I have to implement another configuration settgin system then feed that to th setGlobal. Chris _ From:

[rules-users] ways to specify encoding for .drl files

2009-10-14 Thread RD
Hi Drool users, I'm a total noob in drools, so please forgive me if my questions are answered before (By the way I did search the mailing listing but didn't get anything suitable). The Q I have is "Is there a way to specify the encoding for .drl files"???. I'm using drools 5.0.1 and all my

Re: [rules-users] setting globals in rule file

2009-10-14 Thread Wolfgang Laun
No, globals can only be set by calling the WorkingMemory method wm.setGlobal(String name, Object value) You could call this in a consequence (RHS), but it's usually not a good idea to do so. What do you want to achieve? -W 2009/10/14 Chris Richmond > Shouldn’t it be possible to set a glob

[rules-users] setting globals in rule file

2009-10-14 Thread Chris Richmond
Shouldn't it be possible to set a global variable value within the rule file itself at the top. Something like? global String deviceName = "myDevice"; I thought you could do that, but consistently get an error saying illegal character '=' expected "(" Or something along tho

Re: [rules-users] retrieving agenda-groups from java api

2009-10-14 Thread Chris Richmond
_ From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Chris Richmond Sent: Tuesday, October 13, 2009 11:30 AM To: 'Rules Users List' Subject: [rules-users] retrieving agenda-groups from java api Is there a similar technique for retr

Re: [rules-users] KnowledgeBase & Classloader - reload class or re-create

2009-10-14 Thread Edson Tirelli
Nick, I see. In any case, Drools will not allow you to do that without recompiling the knowledge base, but, why don't you simply make your "MyFunctions" class be a delegate to your actual functions? So, whenever you reload your fuctions, all you need to do is rewire things inside your MyFunc

Re: [rules-users] KnowledgeBase & Classloader - reload class or re-create

2009-10-14 Thread Nicholas Hemley
Edson, Actually, I only use custom action classes in the RHS (see below) e.g. rule TEARDOWN_3004865719 when child0:MyClass ( state1 == 0, stat

Re: [rules-users] KnowledgeBase & Classloader - reload class or re-create Knowledgebase?

2009-10-14 Thread Edson Tirelli
Nicholas, I assume that you are using your classes not only in the consequence, but in the LHS of the rules as well, right? In this case, a knowledge base recompilation will be necessary. That is because Drools must indeed keep references to your class in order to be able to properly match i

[rules-users] KnowledgeBase & Classloader - reload class or re-create Knowledgebase?

2009-10-14 Thread Nicholas Hemley
Hello, I am using various classes in the consequences of my rules and I would like to dynamically re-load the classes. Currently, I include the following code snippet which sets the class loader: KnowledgeBaseConfiguration kbConf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(prop

[rules-users] [droolsflow] ForEach

2009-10-14 Thread Anderson vasconcelos
Hi all I have a flow that has a "for each" where for each Ticket (List of FactObject) create a subflow that contains a HumanTask How can i set the Ticket inside a Content of HumanTask of subflow? I Tried to put #{ticket} inside a content of HumanTask, but the just put a string of class (Ticket.toSt

[rules-users] Problems with GWT WebProject and Drools5.0!

2009-10-14 Thread vamshidhar reddy chitti
Hi All, I have integrated drools rule engine 5.0 with GWT WebProject. When I try to call the rule engine from GWT Applicaiton Engine, I get following exception java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\vamshidharc\drools.packagebuilder.c