Please attach your (rule) source.
You don't provide much for the community to go on.
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Libor Nenadál
Sent: 13 November 2009 13:59
To:
If you are checking for class in the LHS would it not be better to
define a separate rule for the subclass?
I assume you're doing something like:-
rule current
when
MyClass(class == MySubClassOfMyClass.class)
then
//Something specific to the subclass
end
When
Hi Wolfgang,
I'm interested with your reply and am trying to better understand it (although
the use-case has nothing to do with what I do!)
The Score class has a constructor taking Deal and level (assume to be akin to
priority in the original post); however your example Fact insertions
You could look into using a sequential RETE network
http://blog.athico.com/2007/07/sequential-rete.html
http://www.redhat.com/docs/manuals/jboss/jboss-soa-4.2/html/JBoss_Rules_
Manual/ch02s05s10.html
But as Greg suggests, better understanding your use-case might furnish
other ideas.
Can I just clarify that you *need* truth maintenance on the inserts but not on
the retractions?
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton
Sent: 16 September 2009 21:28
To: Rules Users List
Hi Nilima,
This might be of interest
http://www.theserverside.com/discussions/thread.tss?thread_id=46708
although I don't know whether it is supported with Drools 5.x.
Otherwise I believe your only option is to use JAXB to map the XML into
POJO's. I am unsure whether there is a native channel
crawling back under my stone - to spend the weekend R'ingTFM
;-)
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Jaroslaw
Kijanowski
Sent: 16 September 2009 09:41
To: Rules Users List
Subject: Re: [rules-users]
Let me understand you better.
The events do not contain any information about source other than what
can be implied from their temporal position?
Source 1 : 0s, 15s, 30s, 35s etc
Source 2: 5s, 20s, 35s, 40s etc
What if the period between events for a specific source were greater
than 15s (as you
what version of Drools are you using?
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Vikram
Pancholi
Sent: 27 August 2009 15:30
To: rules-users@lists.jboss.org
Subject:
I assume ...but when I change a field of a db-record manually... means you go
into the database and tweak a field?
In which case this is definitely a hibernate session usage issue and I'd
suggest you read up on the latter.
With kind regards,
Mike
-Original Message-
From:
If each rule is held within a unique agenda, you could use agenda
filters.
How would you determine which rule needs to be activated though? You'd
need some criteria hard-coded elsewhere in your application. Why not
make this part of the rules too?
Why not simply use something like this:-
rule TaxCalc
when
$i : Invoice($st : salesTax, $gst : gstRate, $sa : salesAmount,
$id : importDuty, $gr : govtRebate)
then
$i.setTotalTax(round($st + ($gst * $sa / 100) + $id - $gr, 2));
update($i);
end
What do you gain
I believe you will need to add each DRL file into a single RuleBase
(Drools 4.x terminology; I think KnowledgeBase in 5.0 but I'm a little
rusty).
Don't forget rules aren't evaluated when fireAllRules is called but as
objects are inserted into WorkingMemory, so all rules need to be
compiled into
Your jpg was not visible at the enclosed URL.
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of rajakanthan
Sent: 23 June 2009 02:24
To: rules-users@lists.jboss.org
Subject: [rules-users] forEach node Clarification
You have not clearly defined when you want to execute SQL queries.
If you want to access a DB from the LHS you can use the from keyword.
Note the results need to be time-constant i.e. not change on successive
calls.
If you want to access a DB from the RHS it is plain Java (or MVEL
depending
You need to provide more information.
Your question is like me replying with I don't have any problems.
Not very helpful.
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of SHIMI
Abdelouahad ( Prestataire )
Sent: 22
Did you replace the EL jar with that available from JBOSS?
You will still need an EL jar somewhere if you are using JSF.
Do you have Java security enabled in your Tomcat instance? I've
previously had to put the EL jar in Tomcat's lib folder to fix other
issues relating to the use of JSF and EL
Let me see if I understand correctly.
You want the user to be able to define the SQL query (table, field list,
predicates) and have the resulting SQL executed within Drools?
Is this your only requirement for the rules engine; if so have you
thought a rules engine might not be your best option.
);
end
Still not sure if a rules engine is your best option, if I understand
your use case correctly.
From: Anstis, Michael (M.)
Sent: 23 June 2009 10:00
To: 'ami...@hsenidmobile.com'; 'Rules Users List'
Subject: RE: [rules-users
-api.
Bingo now all 3 guvnor ,drools-server ,and my web-client application are
deployed in tomcat 6 and working fine.
Still in need of a document describing ,the complete working of the rest
api
along with the web client to call drools server.
Thanks
Tanzu
Anstis, Michael (M.) wrote:
Did you
/drools/lists.html
Finally, do read the documentation, you would probably be able to answer
your own questions.
With kind regards,
Mike
From: Amila Silva [mailto:ami...@hsenidmobile.com]
Sent: 23 June 2009 10:58
To: Anstis, Michael (M
Correct me if I misunderstand:-
(1) You have a list of Strings accessible using a generic businessData
property.
(2) Nestled within the list *you happen to know* one of the values
represents a SSN and another the loan amount.
(3) You expect Drools to read your mind and workout how to determine
I believe the answer is that Drools implements sub-rule compilation for
rules containing or.
So in essence your rulebase contains the following once compiled:-
rule fire_twice_a
no-loop true
when
eval(true)
then
System.out.println(word);
end
rule fire_twice_b
Perhaps, as Otter suggested, you provide a little more information about
what you are trying to achieve?
quote
Rene,
mhhm, what are your trying to do (besides storing rules in a rdbms)?
What's the use-case?
/quote
-Original Message-
From: rules-users-boun...@lists.jboss.org
Lets think about your new question logically.
A CPU cannot give more than 100% utilisation. If Drools is consuming 80% and
other applications require less than 20% then the other applications
performance will not degrade. If however the other applications require more
than 20% CPU utilisation
I read that JBoss AS supports JRuby classes running in the JVM...
http://oddthesis.org/posts/2009-03-jboss-rails-1-0-0-beta4-in-time-for-t
he-weekend
Whilst I haven't used it nor read about it in detail perhaps this is
something that might be of interest.
With kind regards,
Mike
I concur everybody's statements fully.
The purpose of a rules engine is to remove the need for the application
developer to code algorithms to determine which of a set of rules should
execute given a set of facts\properties\objects. Drools implements the
RETE algorithm. Writing your own code to
used inside drools or should i do it
on
my own of identifying the rules...
Anstis, Michael (M.) wrote:
I concur everybody's statements fully.
The purpose of a rules engine is to remove the need for the
application
developer to code algorithms to determine which of a set of rules
should
Furthermore a rulebase can contain rules from many resources (e.g.
DRL's).
So I guess the cause of your pain is why do you need multiple
rulebases!??!
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Scott Reed
Sent:
The RHS is just a block of Java, do what you like.
There is an implicit variable drools available in the RHS that equates
to an instance of KnowledgeHelper.
(This was 4.x - Hundson doesn't show a KnowledgeHelper for 5 so I'm
guessing things have changed).
-Original Message-
From:
Do you mean object classes that represent DRL or objects that DRL
operate upon (i.e. Facts)?
Facts are simply POJO's and therefore IMO any mechanism that can
deserialise into a POJO should suffice.
You could also look into the use of JNI for the interface between C++
and Drools.
With kind
Hello,
Unless the Drools team have a secret optimisation *I think* there is
no other way to insert large numbers of facts.
Think about it; every fact you insert will need to be propagated through
the RETE network in order for the correct rules to be activated.
You could however optimise your
It is not clear how you want to use the XML?
If the XML represents Facts then you could use a worker Fact and FROM
to deserialise them and make them available to WM. For example:-
rule get some XML facts
when
$w : Worker()
Cheese( ) from $w.getCheesesFromXML();
then
Hi,
I wonder whether Drools 5 Complex Event Processing Support (Temporal
Reasoning) might be what you're looking for?
http://blog.athico.com/2008/07/drools-50-m1-new-and-noteworthy.html
With kind regards,
Mike
From:
Received from Anit, which might help others comment
From: Gupta, Ankit (Ankit) [mailto:gupt...@avaya.com]
Sent: 29 January 2009 10:04
To: Anstis, Michael (M.)
Subject: RE: [rules-users] Parsing XML using Drools
-xpath-implementation-and-more/
Can you enlighten me with your knowledge of XML Streaming in Drools?
From: Gupta, Ankit (Ankit) [mailto:gupt...@avaya.com]
Sent: 29 January 2009 10:04
To: Anstis, Michael (M.)
Subject: RE: [rules
Now, I'm still generally a noob with BRs, so I'm not sure how
this will affect performance. Any advice?
Thanks,
David
On Thu, Jan 29, 2009 at 3:50 AM, Anstis, Michael (M.)
manst...@ford.com wrote:
Hi
).
Thanks,
David
On Thu, Jan 29, 2009 at 5:57 AM, Anstis, Michael (M.)
manst...@ford.com wrote:
Hi David,
Sorry it was of little help
Hi,
A Swim lane is a term associated with UML Activity diagrams where the
activities undertaken by certain actors are grouped into lanes.
Here's the first Google result I found...
http://www.jiscinfonet.ac.uk/InfoKits/process-review/process-review-9.5
With kind regards,
Mike
Please accept that my knowledge is based on 4.x and there might be other
alternatives in 5.
Rules are not ran but their patterns (LHS) evaluated as facts
(objects) are inserted into Working Memory. When all patterns in the LHS
of a rule are matched activations are placed on the agenda for
: in that group of rules : those
which
all paterns match LHS will be inevitably executed.
Wrong. The rules won't be executed (read as activations - RHS -
won't be run) but you can't stop the LHS being evaluated.
All these points that I said, are exact?
Thanks :-)
Anstis, Michael (M.) wrote
I unwrapped my Christmas present early to find that the image links in
the documentation are unfortunately broken in the downloads. I haven't
tried from SVN. :-(
For example
file:///C:/etirelli/workspace/jboss/jbrules-trunk/drools-docs/drools-doc
s-guvnor/en/Chapter-Guvnor/NewMainScreen.png
What version of Drools are you using?
Pre-5 has Shadow Facts so you can't rely upon pass-by-reference. I
believe 5 has had Shadow Facts removed.
Insert places a new object into WM whereas update refreshes (the shadow)
of an existing one.
I would expect you to have to use update in your
You might need to add the MemberDataRecords into WM and use not exists
when
$d : Data()
$mdr : MemberDataRecord( $d1 : loggedInDate )
not exists MemberDataRecord ( loggedInDate $d1 )
then
//Smurf
end
From: [EMAIL PROTECTED]
Why not add your ArrayList items individually into WM?
rule P1 110
salience 1
activation-group 1
when
PriorityType( pricetype == 10,20,30,40,110 )
t:TlbObjectAttributeData( lngAttrTypeId == 110 )
then
result.add(t);
end
Would this not give
your answers a lot!Thanks
Paul
Anstis, Michael (M.) wrote:
OK, so here is my take on things:-
+--+ ++ +---+
| | || | |
| Sub-system 1 |--| Sub-system 2 |--| Sub-system 3 uses |
| sets
] [mailto:[EMAIL PROTECTED] De la part de Anstis,
Michael (M.)
Envoyé : vendredi 8 août 2008 17:36
À : Rules Users List
Objet : RE: [rules-users] Use of a DAO in LHS
I suspect you may not have read the documentation.
Take a look
Hi psentosa,
I don't fully understand what you require, but won't using a List of
WashRuleMatches provide what you need?
rule A
when
$s : Shirt (dirtinessLevel == high)
$holder : WashRuleValueHolder()
Then
System.out.println (this cloth should be washed in 60 degree
water
Hi Paul,
What about subclassing List and adding a type attribute?
class MyArrayList extends ArrayList {
private String type;
public String getType() {
return type;
}
}
Rule smurf
when
$l : MyArrayList( type == 'shirt' )
I think you might need to post more of your source if possible.
Where are you setting PoolInfo.daysBeforeSummons to 5, outside WM and
before fireAllRules or within the RHS of another rule?
Thanks,
Mike
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Well, IMO, common sense suggests highly specialised hand crafted code
optimised to a particular problem domain *should* be faster than a
generic algorithm (taking this further why not dump the high level
languages all together and opt for C++ or assembler, if you really
really want you squeeze
Section 2.2. Why use a Rule Engine in the documentation gives a wealth
of extra information that I forgot about first time round!
-Original Message-
From: Anstis, Michael (M.)
Sent: 08 August 2008 09:07
To: 'Rules Users List'
Subject: RE: [rules-users] Drools vs Business Logic
Well
I suspect you may not have read the documentation.
Take a look at the from keyword.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of BINET
JEAN-BAPTISTE
Sent: 08 August 2008 16:01
To: rules-users@lists.jboss.org
Hi Mark,
A few questions:-
(A) What does parallel evaluation of a rulebase mean? Is it designed
to optimise, for example, two threads processing a stateless and
stateful session?
(B) Are there only two partitions, both of which are invisible to the
user? Is there any value in allowing
I believe the from keyword will iterate only the items in list1.
I don't consider it naïve though; just doing what it is documented to do.
If you want to iterate facts in the RETE network you need to insert them into
working memory.
You could use a rule to do this (copy from a global into WM)
are actually passed to
the execute() method. Hence the dilema whether the engine will look at the
WM or at the global. to my understanding, it will loop on the global. I just
want to be sure that I understand it correctly.
Thanks, Yoni
Anstis, Michael (M.) wrote:
I believe the from keyword
Do you use a stateful session?
Are your measurements before and after you've inserted facts into
working memory?
Would be helpful to the group to post your use-case source?
Thanks,
Mike
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
You can use any technology you like to get data from outside the Working
Memory using the from keyword.
Look at the documentation for more details.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of thomas kukofka
Sent: 28 July 2008
drools.getworkingmemory.startprocess(id) Starts a new process instance
for the process with the given id.
Section 6.8.4. Using a rule flow in your application of the (4.0.5)
manual gives more information.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Cross posted for information.
Ths subject is more for the user list than the dev' one.
Cheers,
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 9Lives 9Lives
Sent: 14 July 2008 14:33
To: Rules Dev List
Subject:
I wonder whether is's a benefit of truth maintenance? If a new fact is
inserted into working memory that could cause an activation of a rule
that contains an accumulate (or collect) to change then the whole
accumulate (or collect) operator is executed again?!?
-Original Message-
From:
Hi,
Given the rule you show it doesn't matter how many records you have on a
table UNLESS they are inserted into working memory. So, assuming you
have code outside of that below which inserts each individual record
into working memory, then you can expect one activation to appear on the
agenda
, and the email archive, there is
really no good example or explanation on how to achieve this.
(What I want is to insert, select or delete some objects in relational
database such as mysql.)
Any information is greatly appreciated.
Thanks.
On Tue, Jul 8, 2008 at 4:20 AM, Anstis, Michael (M.) [EMAIL
Hi,
I don't think Drools supports this directly, but would this not be as
accomplishable with DSL?
Your Drools rule could then be written something like this (bare in mind I'm
no DSL expert):-
DSL:
[when]There is a hemoglobin lab result with=LabResult(type==hemoglobin)
[when]- a value less
Hi,
I believe Stateless session is only a wrapper around a stateful session, so
you're only gaining convenience by using a Stateless one.
Why not write your own wrapper that allows for the execution of a rule flow
too?
Cheers,
Mike
-Original Message-
From: [EMAIL PROTECTED]
Partial answer.
2. Drools supports database interactions. Have a look at the from clause
which allows for retrieval of data from outside the working memory.
Cheers,
Mike
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thalupula Ravi
Sent: 30 May 2008
Without knowledge of your use case or domain model the below seems
reasonable!
Cheers,
Mike
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lake Pancake
Sent: 30 May 2008 13:33
To: rules-users@lists.jboss.org
Subject: [rules-users] Re: Old drools-spring project
Erm, Rule Flow springs immediately to mind.
Or you can use semaphore Facts yourself - but you're re-inventing the (Rule
Flow) wheel.
rule rule 1
when
condition is true
then
insert(new SemaphoreFact());
end
rule rule 2
when
SemaphoreFact()
Some
Hi Richard,
The when section matches fact (object) patterns, so your requirement could
be written as:-
when there is a Test Fact 'A' and another Test Fact 'B' where the 'x'
property of 'A' equals the 'y' property of fact 'B' plus 1 then.
This would become:-
rule Rule 1
when
Test(
.
Can the whole rule be defined in Groovy/Java - if so I might be easier doing
that. I have so much work to do!
many thanks
Richard
2008/5/2 Anstis, Michael (M.) [EMAIL PROTECTED]:
Hi Richard,
The when section matches fact (object) patterns, so your requirement could
be written as:-
when
It will occur whenever you (the developer) make it occur.
I guess Rulebase is the RETE network (without memory nodes) and the WM's are
in essence the RETE network memory nodes.
This is my interpretation of their roles.
Here's an example:-
Rulebase
RuleBase ruleBase =
Have you read the manual?
I would really, really suggest you do.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of anandhakrishnan
Sent: 28 April 2008 15:37
To: rules-users@lists.jboss.org
Subject: [rules-users] StateFullSession / StatelessSession
What
IMO, the analogy between Rule Engine and ORDBMS *could* be made with only
very simple business rules covering one object (presumably mapped to one
table). However you would still need to design mechanisms to support truth
maintenance and an activation schedule. Once the complexity of your business
So, in my usual helpful manner I thought Drools would be a perfect match and
put together what I thought would be a simple example:-
package com.sample
global com.sample.DBUtils dbutils;
rule a1
when
$max : Integer() from accumulate( Integer( $v : intValue ) from
I believe this is an example of backwards-chaining.
(From the manual) Drools only supports forward-chaining at present although
...Drools will be adding support for Backward Chaining in its next major
release
Have you looked at Geoffrey De Smet's drools-solver excellent work? Will
this
.
On Wed, Apr 23, 2008 at 5:50 PM, Anstis, Michael (M.) [EMAIL PROTECTED]
wrote:
So, in my usual helpful manner I thought Drools would be a perfect match and
put together what I thought would be a simple example:-
package com.sample
global com.sample.DBUtils dbutils;
rule a1
when
$max
Don't ask me to explain why but the Drools team always recommend flattening
hierarchies before inserting into WM ;-)
I *think* this allows for individual facts' properties to be indexed in the
RETE network thus affording a performance increase.
I guess there's also implications to do with truth
I have tried to re-produce using System.out.println instead of IELogger
and I don't get any double activations :-(
Could the problem be elsewhere (e.g. IELogger?).
package com.sample
import com.sample.MyVariable;
rule Light is off
when
$brightness :
than once. But I don't see that happening.
In any event wouldn't the audit log tell me if I was doing that?
-A
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael
(M.)
Sent: Thursday, April 17, 2008 2:11 AM
To: Rules Users List
Subject: RE
I guess the example is a simplification as c (in RHS) has not been bound
to a fact.
Anyway, that aside, do you call update to ensure WM knows of changes to
facts otherwise properties need to be time-constant which in your example
they are not.
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL
In essence, yes. Have a look at update in the manual (and a read on Shadow
Facts will probably be useful too).
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Guéhenneux
Sent: 11 April 2008 10:24
To: Rules Users List
Subject: RE: [rules-users] Synch Business
I was thinking something more like this:-
package com.sample
import com.sample.Test
rule rule 1 - 1
salience 90
when
a : Test(
computed == false,
c 15,
d = 75)
then
System.out.println(setting e to 0);
a.setE(0);
I've got 4.0.5 and it mentions insert, update and retract throughout the
manual.
There was an API change some versions ago, but I forget when exactly.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of X10
Sent: 11 April 2008 12:34
To: Rules Users List
Do you need ruleflow? Perhaps this is too simple and I misunderstood.
package com.sample;
public class Test {
private Integer a;
private Integer b;
private Integer c;
public Integer getA() {
return a;
}
public Integer getB() {
return b;
}
I am confident Drools supports what you are looking for; did you try
update() - or modify() - in the then part of the rule (and not in Java as
you code snippet)?
Can you explain more the need for the computed flag on the fact? Is the
value of a property set sometimes whilst calculated at other
There is an implicit KnowledgeHelper object called drools available in the
RHS.
drools.getRule().getName() will provide what you need.
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 11 April 2008 16:04
To: rules-users@lists.jboss.org
Subject:
I *seem* to be able to still use update in the RHS with 4.0.5.
Perhaps I've got my binaries mixed up. If I get the chance I'll do a clean
install.
Thanks for the clarification - I don't want to end up confusing matters with
my help ;-)
-Original Message-
From: [EMAIL PROTECTED]
IMO, the first.
Another answer; I believe RuleFlow controls the activation sequence so IMO
yes. Kris, care to correct me?
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Guéhenneux
Sent: 10 April 2008 11:36
To: Rules Users List
Subject: [rules-users]
All facts are matched against all patterns upon insertion into working
memory. The (Drools) techniques you describe affect the execution of
activations (i.e. RHS) not pattern matching.
I think (but it's a vague recollection) however that the sequence of
patterns has an affect (so you want most
If you cannot combine the rules into new rules I would suggest looking at
rule flow.
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chong Minsk Goh
Sent: 04 April 2008 10:57
To: rules-users@lists.jboss.org
Subject: [rules-users] Rules File Design Consideration
Hi,
IMO, you have not informed the engine\RETE network that details have changed
in your first example.
This would probably be a better example:-
rule 30 is the new 20
when
person : Person( $d : details.age == 30 )
then
person.getDetails().setAge(20);
System.out.println( Now
[mailto:[EMAIL PROTECTED]
Sent: 12 March 2008 19:07
To: Anstis, Michael (M.)
Subject: RE: Can I use drools to solve my problem?
Actually I was able to get near to that, but thank you very much, it cleared
my mind. My problem still is to group things. So I have a list of products
and I want
:[EMAIL PROTECTED]
Sent: 07 March 2008 17:08
To: Anstis, Michael (M.)
Subject: RE: Can I use drools to solve my problem?
alright. I was trying not to boder you.
My companie is developing a billing software for a e-commerce site. So we
have an Order and we have to transform it into deliveries. So
Your anonymous sub-class isn't entered or it doesn't run as expected?
In your accept override you compare object references - type == AGENDA.
Is this what you really want?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mehak
Sent: 10 March 2008 13:49
Posted to forum for a wider audience.
I think you will need to be more specific with your use case.
With kind regards,
Mike
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 07 March 2008 15:35
To: Anstis, Michael (M.)
Subject: Can I use drools to solve my
Are you sure you only have three facts?
Your original resultset showed Order value=5 which is not in the dataset
shown in your most recent email.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barath
Sent: 21 February 2008 10:34
To:
Code:-
public static final void main(String[] args) {
...
WorkingMemory wm = ruleBase.newStatefulSession();
wm.insert(new Order(1));
wm.insert(new Order(2));
wm.insert(new Order(3));
wm.fireAllRules();
...
}
Rule:-
rule Descending order
Sorry I agree with Christian not Scott!
I will try to refer to the correct email in my inbox next time ;-)
-Original Message-
From: Anstis, Michael (M.)
Sent: 21 February 2008 14:00
To: 'Rules Users List'
Subject: RE: [rules-users] Plz reply : Descending order rule
Code:-
public
2.4. Rete Algorithm in the manual provides some insight.
Let the group know whether this satisfies your curiosity - otherwise Google
for Dr. Charles Forgy or RETE for detailed stuff.
Don't forget Drools is based upon RETE but has many enhancements.
Happy reading
Mike
-Original
You could use an inline eval too.
The problem possibly lies more with your model; why not have one subclass
expose the String property and another the Integer property and code the
rules using the subclasses? Much safer throughout the entire application
than having to worry whether some field is
1 - 100 of 196 matches
Mail list logo