Upgrading to Drools 5, but continuing with old API
by Sobhana
hi,
We are using Drools 4.0.7 at present and looking to move to Drools 5.0. How
long is the old API expected to be supported? This will help us plan by when
we'll need to refactor our code to use the new APIs.
What about the rules in existing DRL files? I read in another post that they
are backward compatible. Will there be a huge learning curve in
understanding the new DRL syntax so that it can be used for upcoming rules?
Is there a problem in using the new DRL syntax with old Drools APIs?
Thanks,
Sobhana
--
View this message in context: http://www.nabble.com/Upgrading-to-Drools-5%2C-but-continuing-with-old-AP...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 7 months
Re: [rules-users] optimization on a lot of simple rules
by Greg Barton
1) Yes, if you eliminate joins in rules, you will have no joins in the rete. This is self evident.
2) The way you have the rules structured, there is no relationship between the joined objects. This will cause what's called a "cartesian join" where all combinations of all instances of each object type are instantiated. This can be very expensive, memory and CPU wise. You've stated that there are only one instance of each object type in working memory, but are you absolutely sure of that? Cartesian joins can easily cause performance problems quite quickly.
For instance, say you've got these objects in working memory:
Subscriber(gender="male")
Subscriber(gender="female")
Service(name="ftp")
Service(name="http")
Product(id=1)
Product(id=2)
Product(id=3)
After inserting a Decision into working memory, the rule will fire 2*2*3 times. (#Subscribers * #Services * #Products) This is by design. Is this what you want?
3) Do you really need the 'Subscriber(gender == "male" or "female")' term? Why not just 'Subscriber()'? Are you classifying transgendered or nonhuman subscribers in your system?
--- On Mon, 7/20/09, nesta <nesta.fdb(a)163.com> wrote:
> From: nesta <nesta.fdb(a)163.com>
> Subject: Re: [rules-users] optimization on a lot of simple rules
> To: rules-users(a)lists.jboss.org
> Date: Monday, July 20, 2009, 10:22 AM
>
> I want to test the matching performance of drools. As I
> mentioned that there
> are a lot of rules and the rule is like:
> rule 1
> when
> Decision()
> Subscriber(gender ==
> "male" or "female")
> Service(name ==
> "ftp" or "http")
> Product(id == 1)
> ......
> then
> end
>
> After test, more condition elements under when, more time
> needs to execute
> the test.
> for example
> Location ( location == "home" or "office")
> and so on.
> So I worry about the matching performance with drools.
>
> I found that a lot of JoinNodes would be executed in
> runtime. I mean if
> there is 1000 rules, there will be a lot of JoinNodes
> (There are at least
> 1000 JoinNodes between Decision and Product ). And it
> exactly affects the
> execution performance.
>
> As you know, Decision, Product, Servcie and so on are plan
> Java classes. If
> I define all of attributes of above classes in one class
> named WholeFact,
> only one Java Type, there is no mentioned issue.
>
> With WholeFact class, the rule will be changed as follows:
> rule 1
> when
> WholeFact(
> subscriberGender == "male" or "female",
>
> serviceName
> == "ftp" or "http",
>
>
> productId == 1 or 2 or 3 ...
> )
> then
> end
>
>
> Greg Barton wrote:
> >
> >
> > Now this finally rises to something that needs rules.
> :) In all of the
> > previous examples you've given you could just have a
> > Map<ProductKey,Handler> where the Handler looks
> like this:
> >
> > interface Handler {
> > void handle(Product product, Decision
> decision);
> > }
> >
> > ...and the ProductKey consists of properties that
> uniquely identify how
> > the Product is handled. So, on it's own, that
> functionality did not
> > require rules.
> >
> > However, now that you've introduced more complex
> decisions, with varying
> > data, to affect the Decision for each Property type,
> rules are more
> > appropriate.
> >
> > Is there any reason why you only have one of each
> object type in memory at
> > one time? Maybe if you state more of the problem
> requirements we can help
> > you better.
> >
> > --- On Mon, 7/20/09, nesta <nesta.fdb(a)163.com>
> wrote:
> >
> >> From: nesta <nesta.fdb(a)163.com>
> >> Subject: Re: [rules-users] optimization on a lot
> of simple rules
> >> To: rules-users(a)lists.jboss.org
> >> Date: Monday, July 20, 2009, 4:14 AM
> >>
> >> Thanks very much.
> >> But if for every rule, there is one algorithm or
> discount
> >> which means that
> >> result has nothing related with Product's id and
> usage. I
> >> can't merge all
> >> rules in one rule. At the same time, besides
> Product and
> >> Decision fact type,
> >> there are more fact types.
> >> For example:
> >> rule 1
> >> when
> >> Decision()
> >> Subscriber(gender ==
> >> "male" or "female")
> >> Service(name ==
> >> "ftp" or "http")
> >> Product(id == 1)
> >> ......
> >> then
> >> ......
> >> end
> >> rule 2
> >> when
> >> Decision()
> >> Subscriber(gender ==
> >> "male" or "female")
> >> Service(name ==
> >> "ftp" or "http")
> >> Product(id == 2)
> >> ......
> >> then
> >> ......
> >> end
> >>
> >> .....
> >> .....
> >>
> >> In this scenario, if there are 1000 rules, there
> will
> >> be a lot of JoinNode.
> >> But in runtime, there is only one Decision
> instance, one
> >> Subscriber instance
> >> and Service instance.
> >>
> >> If I define all data in one fact type, I think
> that there
> >> are not a lot of
> >> JoinNodes.
> >>
> >> Is there any other method?
> >>
> >>
> >>
> >> Wolfgang Laun-2 wrote:
> >> >
> >> > Well, what is the realtion between id, usage
> and the
> >> result that's to be
> >> > stored in a Decision or a global?
> >> >
> >> > Typically, such rules could be written as
> >> >
> >> > rule x
> >> > no-loop true
> >> > when
> >> > $d : Decision()
> >> > $p :Product( id == 1, $usage :
> >> usage )
> >> > then
> >> > compute/store value, depending
> >> on the formula for id == 1 (using
> >> > usage)
> >> > end
> >> > // similar rule for id == 2,3,...
> >> >
> >> > If value is a straightforward function of id
> (and
> >> usage), then implement a
> >> > function compValue and use a single rule,
> e.g.:
> >> >
> >> > rule x
> >> > no-loop true
> >> > when
> >> > $d : Decision()
> >> > Product( $id : id, $usage :
> >> usage)
> >> > then
> >> > modify $d value to compValue( $id,
> $usage
> >> )
> >> >
> >> > Distinguishing all individual combinations of
> id and
> >> usage on the LHS
> >> > seems
> >> > excessive.
> >> >
> >> > The ordering of CEs also affects execution
> times.
> >> >
> >> > -W
> >> >
> >> > On 7/20/09, nesta <nesta.fdb(a)163.com>
> >> wrote:
> >> >>
> >> >>
> >> >> In this scenario, there are 1000
> products,
> >> different product has
> >> >> different
> >> >> price, besides this, the price is
> affected by
> >> usage. I want to use
> >> >> Product.id to match the rules.
> >> >>
> >> >> As you mentioned "The crude duplication
> of rules
> >> where only the constant
> >> >> to
> >> >> be matched with
> >> >> Product.id varies can, most likely, be
> avoided."
> >> >>
> >> >> How to avoid it in this scenario?
> >> >>
> >> >>
> >> >> Wolfgang Laun-2 wrote:
> >> >> >
> >> >> > It's difficult to suggest an
> optimized form
> >> for your rules 1-infinity,
> >> >> > since
> >> >> > we do not know what you want to
> achieve.
> >> >> >
> >> >> > The crude duplication of rules where
> only the
> >> constant to be matched
> >> >> with
> >> >> > Product.id varies can, most likely,
> be
> >> avoided.
> >> >> >
> >> >> > -W
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Sun, Jul 19, 2009 at 3:15 PM,
> nesta <nesta.fdb(a)163.com>
> >> wrote:
> >> >> >
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> I am a newbie in drools. There
> are a lot
> >> of simple rules in a
> >> >> scenario.
> >> >> >> For example
> >> >> >> rule 1
> >> >> >> when
> >> >> >> Product( id
> >> ==1, usage == 1)
> >> >> >> $decision :
> >> Decision()
> >> >> >> then
> >> >> >>
> >> $decision.setValue(1);
> >> >> >> end
> >> >> >>
> >> >> >> rule 2
> >> >> >> when Product( id ==2, usage ==
> 1)
> >> >> >> $decision : Decision()
> >> >> >> rule 3
> >> >> >> when Product( id ==3, usage ==
> 1)
> >> >> >> $decision : Decision()
> >> >> >> rule 4
> >> >> >> when Product( id ==4, usage ==
> 1)
> >> >> >> $decision : Decision()
> >> >> >> rule 5
> >> >> >> when Product( id ==5, usage ==
> 1)
> >> >> >> $decision : Decision()
> >> >> >> ......
> >> >> >>
> >> >> >> I have a Product fact whose id =
> 5 and
> >> usage = 1, in my first
> >> >> thinking,
> >> >> >> only
> >> >> >> rule 5 is matched, there should
> be not
> >> much more different between 1
> >> >> rule
> >> >> >> and a lot of rules in runtime.
> >> >> >>
> >> >> >> But the result shows that they
> are
> >> different. More rules will cost
> >> >> more
> >> >> >> time. If there are 1 thousand
> rules, some
> >> Node and Sink will execute 1
> >> >> >> thousand times.
> >> >> >>
> >> >> >> My question is how to optimize
> this
> >> scenario?
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >> http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
> >> >> >> Sent from the drools - user
> mailing list
> >> archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> _______________________________________________
> >> >> >> rules-users mailing list
> >> >> >> rules-users(a)lists.jboss.org
> >> >> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >> >> >>
> >> >> >
> >> >> >
> >> _______________________________________________
> >> >> > rules-users mailing list
> >> >> > rules-users(a)lists.jboss.org
> >> >> > https://lists.jboss.org/mailman/listinfo/rules-users
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
> >> >> Sent from the drools - user mailing list
> archive
> >> at Nabble.com.
> >> >>
> >> >>
> _______________________________________________
> >> >> rules-users mailing list
> >> >> rules-users(a)lists.jboss.org
> >> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >> >>
> >> >
> >> >
> _______________________________________________
> >> > rules-users mailing list
> >> > rules-users(a)lists.jboss.org
> >> > https://lists.jboss.org/mailman/listinfo/rules-users
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
> >> Sent from the drools - user mailing list archive
> at
> >> Nabble.com.
> >>
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users(a)lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >>
> >
> >
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> --
> View this message in context: http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
> Sent from the drools - user mailing list archive at
> Nabble.com.
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
16 years, 7 months
Customize the UI
by Rads2029
Hi,
Can anyone give me an example of what exactly needs to be done if I need to
use my own custom UI for rule creation etc. ( In this case my UI is Flex)
As per the rules documentation , we need to to use the ServiceImplementation
class which implements the RepositoryService. ( both of these are in the
package structure org.drools.guvnor.server)
However I could not find any jar where these classes are readily available.
:-((
It would be great if i can get pointers to the jar location and also a small
end to end example of how to plug in custom UI to call the drools guvnor (
brms) service.
Thanks,
Radha
--
View this message in context: http://www.nabble.com/Customize-the-UI-tp23132164p23132164.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 7 months
Re: [rules-users] optimization on a lot of simple rules
by Greg Barton
Now this finally rises to something that needs rules. :) In all of the previous examples you've given you could just have a Map<ProductKey,Handler> where the Handler looks like this:
interface Handler {
void handle(Product product, Decision decision);
}
...and the ProductKey consists of properties that uniquely identify how the Product is handled. So, on it's own, that functionality did not require rules.
However, now that you've introduced more complex decisions, with varying data, to affect the Decision for each Property type, rules are more appropriate.
Is there any reason why you only have one of each object type in memory at one time? Maybe if you state more of the problem requirements we can help you better.
--- On Mon, 7/20/09, nesta <nesta.fdb(a)163.com> wrote:
> From: nesta <nesta.fdb(a)163.com>
> Subject: Re: [rules-users] optimization on a lot of simple rules
> To: rules-users(a)lists.jboss.org
> Date: Monday, July 20, 2009, 4:14 AM
>
> Thanks very much.
> But if for every rule, there is one algorithm or discount
> which means that
> result has nothing related with Product's id and usage. I
> can't merge all
> rules in one rule. At the same time, besides Product and
> Decision fact type,
> there are more fact types.
> For example:
> rule 1
> when
> Decision()
> Subscriber(gender ==
> "male" or "female")
> Service(name ==
> "ftp" or "http")
> Product(id == 1)
> ......
> then
> ......
> end
> rule 2
> when
> Decision()
> Subscriber(gender ==
> "male" or "female")
> Service(name ==
> "ftp" or "http")
> Product(id == 2)
> ......
> then
> ......
> end
>
> .....
> .....
>
> In this scenario, if there are 1000 rules, there will
> be a lot of JoinNode.
> But in runtime, there is only one Decision instance, one
> Subscriber instance
> and Service instance.
>
> If I define all data in one fact type, I think that there
> are not a lot of
> JoinNodes.
>
> Is there any other method?
>
>
>
> Wolfgang Laun-2 wrote:
> >
> > Well, what is the realtion between id, usage and the
> result that's to be
> > stored in a Decision or a global?
> >
> > Typically, such rules could be written as
> >
> > rule x
> > no-loop true
> > when
> > $d : Decision()
> > $p :Product( id == 1, $usage :
> usage )
> > then
> > compute/store value, depending
> on the formula for id == 1 (using
> > usage)
> > end
> > // similar rule for id == 2,3,...
> >
> > If value is a straightforward function of id (and
> usage), then implement a
> > function compValue and use a single rule, e.g.:
> >
> > rule x
> > no-loop true
> > when
> > $d : Decision()
> > Product( $id : id, $usage :
> usage)
> > then
> > modify $d value to compValue( $id, $usage
> )
> >
> > Distinguishing all individual combinations of id and
> usage on the LHS
> > seems
> > excessive.
> >
> > The ordering of CEs also affects execution times.
> >
> > -W
> >
> > On 7/20/09, nesta <nesta.fdb(a)163.com>
> wrote:
> >>
> >>
> >> In this scenario, there are 1000 products,
> different product has
> >> different
> >> price, besides this, the price is affected by
> usage. I want to use
> >> Product.id to match the rules.
> >>
> >> As you mentioned "The crude duplication of rules
> where only the constant
> >> to
> >> be matched with
> >> Product.id varies can, most likely, be avoided."
> >>
> >> How to avoid it in this scenario?
> >>
> >>
> >> Wolfgang Laun-2 wrote:
> >> >
> >> > It's difficult to suggest an optimized form
> for your rules 1-infinity,
> >> > since
> >> > we do not know what you want to achieve.
> >> >
> >> > The crude duplication of rules where only the
> constant to be matched
> >> with
> >> > Product.id varies can, most likely, be
> avoided.
> >> >
> >> > -W
> >> >
> >> >
> >> >
> >> > On Sun, Jul 19, 2009 at 3:15 PM, nesta <nesta.fdb(a)163.com>
> wrote:
> >> >
> >> >>
> >> >> Hi,
> >> >>
> >> >> I am a newbie in drools. There are a lot
> of simple rules in a
> >> scenario.
> >> >> For example
> >> >> rule 1
> >> >> when
> >> >> Product( id
> ==1, usage == 1)
> >> >> $decision :
> Decision()
> >> >> then
> >> >>
> $decision.setValue(1);
> >> >> end
> >> >>
> >> >> rule 2
> >> >> when Product( id ==2, usage == 1)
> >> >> $decision : Decision()
> >> >> rule 3
> >> >> when Product( id ==3, usage == 1)
> >> >> $decision : Decision()
> >> >> rule 4
> >> >> when Product( id ==4, usage == 1)
> >> >> $decision : Decision()
> >> >> rule 5
> >> >> when Product( id ==5, usage == 1)
> >> >> $decision : Decision()
> >> >> ......
> >> >>
> >> >> I have a Product fact whose id = 5 and
> usage = 1, in my first
> >> thinking,
> >> >> only
> >> >> rule 5 is matched, there should be not
> much more different between 1
> >> rule
> >> >> and a lot of rules in runtime.
> >> >>
> >> >> But the result shows that they are
> different. More rules will cost
> >> more
> >> >> time. If there are 1 thousand rules, some
> Node and Sink will execute 1
> >> >> thousand times.
> >> >>
> >> >> My question is how to optimize this
> scenario?
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
> >> >> Sent from the drools - user mailing list
> archive at Nabble.com.
> >> >>
> >> >>
> _______________________________________________
> >> >> rules-users mailing list
> >> >> rules-users(a)lists.jboss.org
> >> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >> >>
> >> >
> >> >
> _______________________________________________
> >> > rules-users mailing list
> >> > rules-users(a)lists.jboss.org
> >> > https://lists.jboss.org/mailman/listinfo/rules-users
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
> >> Sent from the drools - user mailing list archive
> at Nabble.com.
> >>
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users(a)lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >>
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users(a)lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> --
> View this message in context: http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
> Sent from the drools - user mailing list archive at
> Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
16 years, 7 months
big thanks
by Bagwell, Allen F
To the Drools Team:
We've been successfully using Drools 4.0.7 core as a replacement rule engine for a system that was in bad need of an upgrade. When the time came to update this system, we were faced with a daunting task. Our original COTS software that had a rule engine built into it was old, hard to work with, and no longer supported. We quickly figured out that the only real options available to replace this crucial component given our budget and time constraints was Drools or Jess. Although Jess was developed in our own company, Drools fit our needs more closely and was similar in syntax to our defunct rule engine software making it a lot easier to translate our existing rules.
I'm happy to say Drools has been an elegant replacement solution for us and fun to learn.
I just wanted to say thanks for all the hard work you guys have done.
Allen F. Bagwell
16 years, 7 months
Re: [rules-users] rules-users Digest, Vol 32, Issue 57
by G Rajesh
Rafael,
Thank you very much for response.
Unfortunately I could not proceed with the solution as described in the
URL's provided.
Solution provided in the example was for ear files. I could not locate a
solution in case of war file deployment.
Also I would like to mention that if I remove Drools library from the class
path, I am able to run at least my current web application.
Otherwise, if the drools library is in the class path I am unable to run
even the exisiting web application.
Thanks
G. Rajesh
----- Original Message -----
From: <rules-users-request(a)lists.jboss.org>
To: <rules-users(a)lists.jboss.org>
Sent: Saturday, July 18, 2009 9:30 PM
Subject: rules-users Digest, Vol 32, Issue 57
> Send rules-users mailing list submissions to
> rules-users(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/rules-users
> or, via email, send a message with subject or body 'help' to
> rules-users-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> rules-users-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rules-users digest..."
>
>
> Today's Topics:
>
> 1. Re: drools integration problem (Rafael Ribeiro)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 18 Jul 2009 12:02:40 -0300
> From: Rafael Ribeiro <rafaelri(a)gmail.com>
> Subject: Re: [rules-users] drools integration problem
> To: Rules Users List <rules-users(a)lists.jboss.org>
> Message-ID:
> <f97c67390907180802ke312efcke5a3933c1c512521(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Rajesh,
>
> you probably have differente JDT CompilationResult classes on your
> classpath and also on JBoss classpath (I'd guess JBoss Tomcat instance
> uses
> JDT for compilation) . You'll need to configure a separate classloader for
> your application. Here you have the documentation:
> http://www.jboss.org/community/wiki/ClassLoadingConfiguration (Isolation
> with Overriding Server Classes) and an example
> http://www.junlu.com/msg/78287.html
>
> regards,
> Rafael Ribeiro
>
>
> 2009/7/18 G Rajesh <rajesh.chowdary(a)eageyouth.com>
>
>> Hi,
>>
>> I am new to Drools and trying to use Drools 5.0 run time.
>> I am using JBoss 4.2.2 and am trying to integrate drools into existing
>> web
>> application already deployed on JBoss 4.2.2.
>> I've downloaded drools eclipse plugin, copied features, plugins and
>> dependency jars into eclipse respective folders.
>>
>> I am able to successfully run rules on a standalone application.
>> I can deploy the application successfully, but when I browse the home
>> page(or any other thing) of the application, following is the error
>> message
>> thrown by Jboss.
>> Seems it is compiler conflict.
>>
>> Thanks in advance
>> G Rajesh
>>
>>
>> =====================================================
>> Following is the error Msg:
>> ===========================================================================
>>
>> java.lang.NoSuchMethodError:
>> org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/IProblem;
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
16 years, 7 months
optimization on a lot of simple rules
by nesta
Hi,
I am a newbie in drools. There are a lot of simple rules in a scenario.
For example
rule 1
when
Product( id ==1, usage == 1)
$decision : Decision()
then
$decision.setValue(1);
end
rule 2
when Product( id ==2, usage == 1)
$decision : Decision()
rule 3
when Product( id ==3, usage == 1)
$decision : Decision()
rule 4
when Product( id ==4, usage == 1)
$decision : Decision()
rule 5
when Product( id ==5, usage == 1)
$decision : Decision()
......
I have a Product fact whose id = 5 and usage = 1, in my first thinking, only
rule 5 is matched, there should be not much more different between 1 rule
and a lot of rules in runtime.
But the result shows that they are different. More rules will cost more
time. If there are 1 thousand rules, some Node and Sink will execute 1
thousand times.
My question is how to optimize this scenario?
--
View this message in context: http://www.nabble.com/optimization-on-a-lot-of-simple-rules-tp24556724p24...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 7 months
Using drools with a monitoring application with time based data
by Margasahayam, Rengarajan
Hi,
We have a requirement to have rules like
If (cpuusage > 75% and vmsize > 1GB) for 4 minutes
In our application, We would like to create actions based on the firing
of the rule.
Can this be achieved with drools expert engine? If so how?
Thanks
Rengarajan
16 years, 7 months
drools5.0 xml format tutorial?
by Abarna Ramachandran
Hi,
Are there any tutorial available for conversion of .drl files to xml
files.?
Please help me with conversion from .drl to xml format.
For example conversion of helloworld.drl
package org.drools.examples
import org.drools.examples.HelloWorldExample.Message;
global java.util.List list
rule "Hello World"
dialect "mvel"
when
m : Message( status == Message.HELLO, message : message )
then
System.out.println( message );
modify ( m ) { message = "Goodbyte cruel world",
status = Message.GOODBYE };
end
rule "Good Bye"
dialect "java"
when
Message( status == Message.GOODBYE, message : message )
then
System.out.println( message );
end
thanks
ABRA
16 years, 7 months
drools 5.0 .drl as an xml file
by Abarna Ramachandran
Hi
I am a newbie to drools. I would like to convert an existing .drl file in
drools2.0 format to drools5.0 format.
The existing file name is exmpldrools2.0.drl but it is in xml format.
But when i just convert the contents of it to drools5.0 xml format and try
to save it as exmpldrools5.0.drl and try to load the .drl file using
knowledgebuilder i get the error,
"[ERR 101] Line 1:0 no viable alternative at input '<' " . It throws error
in the first line which is <?xml version="1.0" encoding="UTF-8"?>.
Please help me solve this problem.
How do i use xml files instead of .drl files and load the rules?
thanks
ABRA
16 years, 7 months