[rules-users] DSL: concatenating DSLs using and and or

2008-12-15 Thread Chong Minsk Goh
Hi,

We are currently using Drools to enable conditional routing for our
application. We are using DSLs to make it more user friendly.

Using Eclipse DSL editor, I noticed that there is an error (Duplicate
Declaration of variable) if I use and to concatenate 2 DSL statements
using the same variable name but this error does not appear if I use or

For example,

DSL Statement
[when]there is an {id}=$node: Node(nodeId=={id})

Using and
(there is an {id}) and (there is an {id})

Using or
(there is an {id}) or (there is an {id})

With the brackets, each DSL statement should be isolated right? But it is
kinda tricky as if we need to use 2 or more DSL statements together using
the same variable name.

Also, is there any means to create unique variables for use in DSL,
especially when joining for 2 or more DSL statements is required.


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


[rules-users] Rules File Design Consideration

2008-04-04 Thread Chong Minsk Goh
Hi,

Any help to the problem below is much appreciated : )

Here is the problem:

I have a set of rules. Intially these rules are evaluated individually.
However, now there is a need to fire these rules in groups which is similar
to a logic gate AND or OR. And, the results of this groups of rules are
collected and returned to the user/

For example:

There are 4 rules:
Rule 1
Rule 2
Rule 3
Rule 4

Now, need to evaluate (Rule 1 AND Rule 2 AND Rule 3) OR Rule 4
And I need to know what are the results of Rule 1 to Rule 4 individually.


What is the best way to implement a AND or OR using Drools?


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


[rules-users] Re: howto BRMS - already stuck at fact model

2007-11-14 Thread Chong Minsk Goh
Hi Darren,

Glad I am not alone : )

I am also in the process of using BRMS for our application. Would also
like to seek advice on how to better use the BRMS.

Especially on how the parsing of user inputs to DRL is executed,
specifically which package/api in drools is used.




Cheers!
Chong Minsk





 Message: 1
 Date: Wed, 14 Nov 2007 10:06:05 -0500
 From: Darren Hartford [EMAIL PROTECTED]
 Subject: [rules-users] howto BRMS - already stuck at fact model
loading
 To: rules-users@lists.jboss.org
 Message-ID:
[EMAIL PROTECTED]
 Content-Type: text/plain; charset=us-ascii

 Hey all, new to BRMS as trying to learn how this works.  My usecase is
 to take an existing, working EJB3 application and migrate some of the
 complex rules over to be managed by BRMS.



 However, initial attempts over the course of a couple of days have
 yielded zero results.



 When trying to follow
 http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html_single/index.
 html#d0e5301, they want you to load a fact model.  I take an existing
 EJB3 entity bean and it loads fine.  There doesn't seem anything more
 for me to do, or to verify this is o.k. or not.  So, then I move to the
 rule editors, and nothing works - not able to use the guided editor at
 all, and using the DSL text editor with the 'model/entity' from the jar
 isn't recognized.



 Now, I admit ignorance, and I would like some direction as to how to
 best learn to use BRMS.



 There were a couple mentions of a drools-examples-brms, but it just can
 not be found.  Following the documentation mentioned above is only
 guidelines without any good examples leaving one easily lost.



 http://www.google.com/search?q=drools-example-brms

 http://www.nabble.com/forum/Search.jtp?query=jbrms+examplelocal=yforum
 =11822daterange=0startdate=enddate=

 http://labs.jboss.com/drools/downloads.html

 http://labs.jboss.com/drools/livetrails/index.html



 So - where can one go to learn how to use BRMS to help convert an
 existing EJB3 application to use Drools and BRMS?



 Thanky,

 -D

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


[rules-users] RuntimeDroolsException: Unable to load dialect

2007-10-15 Thread Chong Minsk Goh
Hi,

I am trying to run Drools on Netbeans. I have added the jars from Drools
4.0.2.

However, I encountered an error

org.doxa.rules.RulesManager - org.drools.RuntimeDroolsException: Unable to
load dialect '
org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel'

I did not use any MVEL dialects in my rules definition. Here is my rule:
*

rule* Out of Range

*when
*

m : Message( message == checkRange , status == 1 )

Range(myMin : myMin, myMax : myMax, myValue : myValue)

Range(myValue  myMin || myValue  myMax)

*then*

m.setMessage();

m.setStatus(0);

*end
*

Has anyone attempted using Netbeans with Drools and faced this problem?

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


[rules-users] Accumulate Functions for forms

2007-10-07 Thread Chong Minsk Goh
Hi Everyone,

I am currently trying to write customize Java codes for
MinAccumulateFunction and MaxAccumulateFunction. However, I could not find
any guidelines or templates for these two (there is one for sum and avg in
the Documentation).

Could anyone provide some resources or examples how to write these
functions?



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