Re: [rules-users] Guvnor Test Scenario - value equality

2009-11-13 Thread Anstis, Michael (M.)
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:

Re: [rules-users] Java beans inheritance

2009-11-12 Thread Anstis, Michael (M.)
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

Re: [rules-users] Specific Agenda strategy to control which rulesto fire

2009-10-29 Thread Anstis, Michael (M.)
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

Re: [rules-users] Better way to run each rule once?

2009-10-09 Thread Anstis, Michael (M.)
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.

Re: [rules-users] How to prevent activation list creation onretracts

2009-09-17 Thread Anstis, Michael (M.)
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

Re: [rules-users] Applying rules on xml data

2009-09-16 Thread Anstis, Michael (M.)
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

Re: [rules-users] Applying rules on xml data

2009-09-16 Thread Anstis, Michael (M.)
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]

Re: [rules-users] Drools Fuson and Deltas (differences)

2009-09-14 Thread Anstis, Michael (M.)
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

Re: [rules-users] modify facts problem

2009-08-27 Thread Anstis, Michael (M.)
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:

RE: [rules-users] Hibernate Query delivers wrong values

2009-07-10 Thread Anstis, Michael (M.)
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:

RE: [rules-users] How execute a Single rule from rule file or rulepackage

2009-07-06 Thread Anstis, Michael (M.)
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?

RE: [rules-users] Formula value assginment in LHS

2009-07-05 Thread Anstis, Michael (M.)
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

RE: [rules-users] How to call a another drl file from one drl file

2009-07-02 Thread Anstis, Michael (M.)
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

RE: [rules-users] forEach node Clarification

2009-06-23 Thread Anstis, Michael (M.)
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

RE: [rules-users] How to execute the SQL query using drools

2009-06-23 Thread Anstis, Michael (M.)
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

RE: [rules-users] help

2009-06-23 Thread Anstis, Michael (M.)
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

RE: [rules-users] Link for drools-server module

2009-06-23 Thread Anstis, Michael (M.)
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

RE: [rules-users] How to execute the SQL query using drools

2009-06-23 Thread Anstis, Michael (M.)
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.

RE: [rules-users] How to execute the SQL query using drools

2009-06-23 Thread Anstis, Michael (M.)
); 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

RE: [rules-users] Link for drools-server module

2009-06-23 Thread Anstis, Michael (M.)
-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

RE: [rules-users] How to execute the SQL query using drools

2009-06-23 Thread Anstis, Michael (M.)
/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

RE: [rules-users] Inserting Collection into WorkingMemory

2009-06-11 Thread 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

RE: [rules-users] OR operator affects how many times Rule's actionis executed

2009-06-08 Thread Anstis, Michael (M.)
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

RE: [rules-users] A relational SQL Database as RuleBase

2009-06-04 Thread Anstis, Michael (M.)
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

RE: [rules-users] high cpu usage

2009-03-25 Thread Anstis, Michael (M.)
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

RE: [rules-users] Inserting a JRuby object via Spring JRubyScriptFactory in Drools

2009-03-20 Thread Anstis, Michael (M.)
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

RE: [rules-users] Identify Rule on Attributes

2009-03-13 Thread Anstis, Michael (M.)
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

RE: [rules-users] Identify Rule on Attributes

2009-03-13 Thread Anstis, Michael (M.)
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

RE: [rules-users] Identify Rule on Attributes

2009-03-13 Thread Anstis, Michael (M.)
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:

RE: [rules-users] Inserting collection of facts in rule Consequence

2009-02-09 Thread Anstis, Michael (M.)
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:

RE: [rules-users] Java Bean dependency

2009-02-06 Thread Anstis, Michael (M.)
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

RE: [rules-users] one question about asserting facts

2009-02-06 Thread Anstis, Michael (M.)
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

RE: [rules-users] Parsing XML using Drools

2009-01-29 Thread Anstis, Michael (M.)
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

RE: [rules-users] Working with dates in rules

2009-01-29 Thread Anstis, Michael (M.)
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:

FW: [rules-users] Parsing XML using Drools

2009-01-29 Thread Anstis, Michael (M.)
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

RE: [rules-users] Parsing XML using Drools

2009-01-29 Thread Anstis, Michael (M.)
-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

RE: [rules-users] Working with dates in rules

2009-01-29 Thread Anstis, Michael (M.)
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

RE: [rules-users] Working with dates in rules

2009-01-29 Thread Anstis, Michael (M.)
). 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

RE: [rules-users] Human Task

2009-01-29 Thread Anstis, Michael (M.)
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

RE: [rules-users] Run a set of rules in a group B from a rule in a group A

2009-01-21 Thread Anstis, Michael (M.)
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

RE: [rules-users] Run a set of rules in a group B from a rule in agroup A

2009-01-21 Thread Anstis, Michael (M.)
: 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

RE: [rules-users] M2: What Revision?

2008-09-30 Thread Anstis, Michael (M.)
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

RE: [rules-users] Update vs insert

2008-09-11 Thread Anstis, Michael (M.)
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

RE: [rules-users] getting latest date

2008-09-11 Thread Anstis, Michael (M.)
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]

RE: [rules-users] Java code Vs Drools

2008-08-13 Thread Anstis, Michael (M.)
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

RE: [rules-users] Fetching values of an object's attribute setbydifferent rules

2008-08-12 Thread Anstis, Michael (M.)
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

RE: [rules-users] Use of a DAO in LHS

2008-08-11 Thread Anstis, Michael (M.)
] [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

RE: [rules-users] Fetching values of an object's attribute set bydifferent rules

2008-08-11 Thread Anstis, Michael (M.)
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

RE: [rules-users] Fetching values of an object's attribute setbydifferent rules

2008-08-11 Thread Anstis, Michael (M.)
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' )

RE: [rules-users] Decision table not triggering

2008-08-08 Thread Anstis, Michael (M.)
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

RE: [rules-users] Drools vs Business Logic

2008-08-08 Thread Anstis, Michael (M.)
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

RE: [rules-users] Drools vs Business Logic

2008-08-08 Thread Anstis, Michael (M.)
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

RE: [rules-users] Use of a DAO in LHS

2008-08-08 Thread Anstis, Michael (M.)
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

RE: [rules-users] determinism with rulebase partitioning

2008-08-01 Thread Anstis, Michael (M.)
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

RE: [rules-users] 'from global' and the workingMemory

2008-07-30 Thread Anstis, Michael (M.)
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)

RE: [rules-users] 'from global' and the workingMemory

2008-07-30 Thread Anstis, Michael (M.)
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

RE: [rules-users] Measuring Drools Memory Usage

2008-07-29 Thread Anstis, Michael (M.)
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

RE: [rules-users] database access via JDBC

2008-07-28 Thread Anstis, Michael (M.)
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

RE: [rules-users] How to invoke particular ruleflow multiple rule flowsfrom from stateless session

2008-07-23 Thread Anstis, Michael (M.)
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

[rules-users] RE: [rules-dev] Multi threading usage best practice

2008-07-14 Thread Anstis, Michael (M.)
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:

RE: [rules-users] Drools 4 poor performance scaling?

2008-07-09 Thread Anstis, Michael (M.)
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:

RE: [rules-users] Rules 'firing' multiple times?

2008-07-08 Thread Anstis, Michael (M.)
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

RE: [rules-users] One question about Database interface

2008-07-08 Thread Anstis, Michael (M.)
, 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

RE: [rules-users] Package parameters

2008-06-26 Thread Anstis, Michael (M.)
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

RE: [rules-users] Stateless session and rule flows

2008-06-26 Thread Anstis, Michael (M.)
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]

RE: [rules-users] Drools 4.0.7 supports Clustering and DB interaction ?

2008-05-30 Thread Anstis, Michael (M.)
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

RE: [rules-users] Re: Old drools-spring project

2008-05-30 Thread Anstis, Michael (M.)
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

RE: [rules-users] Nested Rules

2008-05-22 Thread Anstis, Michael (M.)
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

RE: [rules-users] newbie question on when condition syntax

2008-05-02 Thread Anstis, Michael (M.)
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(

RE: [rules-users] newbie question on when condition syntax

2008-05-02 Thread Anstis, Michael (M.)
. 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

RE: [rules-users] RuleBase relation with working memory

2008-04-28 Thread Anstis, Michael (M.)
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 =

RE: [rules-users] StateFullSession / StatelessSession

2008-04-28 Thread Anstis, Michael (M.)
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

RE: [rules-users] Fundamental Question

2008-04-24 Thread Anstis, Michael (M.)
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

RE: [rules-users] Re: Is this scenario suitable for using Drools?

2008-04-23 Thread Anstis, Michael (M.)
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

RE: [rules-users] What-if analysis

2008-04-23 Thread Anstis, Michael (M.)
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

RE: [rules-users] Re: Is this scenario suitable for using Drools?

2008-04-23 Thread Anstis, Michael (M.)
. 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

RE: [rules-users] To insert facts or use the find clause?

2008-04-18 Thread Anstis, Michael (M.)
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

RE: [rules-users] Why double rule activation?

2008-04-17 Thread Anstis, Michael (M.)
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 :

RE: [rules-users] Why double rule activation?

2008-04-17 Thread Anstis, Michael (M.)
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

RE: [rules-users] Synch Business Object / Working Memory

2008-04-11 Thread Anstis, Michael (M.)
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

RE: [rules-users] Synch Business Object / Working Memory

2008-04-11 Thread Anstis, Michael (M.)
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

RE: [rules-users] Synch Business Object / Working Memory

2008-04-11 Thread Anstis, Michael (M.)
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);

RE: [rules-users] modify()

2008-04-11 Thread Anstis, Michael (M.)
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

RE: [rules-users] Synch Business Object / Working Memory

2008-04-11 Thread Anstis, Michael (M.)
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; }

RE: [rules-users] Synch Business Object / Working Memory

2008-04-11 Thread Anstis, Michael (M.)
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

RE: [rules-users] Access to currently executing rule in consequence?

2008-04-11 Thread Anstis, Michael (M.)
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:

RE: [rules-users] modify()

2008-04-11 Thread Anstis, Michael (M.)
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]

RE: [rules-users] Ruleflows

2008-04-10 Thread Anstis, Michael (M.)
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]

RE: [rules-users] Short circuiting evaluations on LHS

2008-04-07 Thread Anstis, Michael (M.)
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

RE: [rules-users] Rules File Design Consideration

2008-04-07 Thread Anstis, Michael (M.)
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,

RE: [rules-users] Can only reason over sub-objects if you use the FromConditional Element

2008-03-17 Thread Anstis, Michael (M.)
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

[rules-users] RE: Can I use drools to solve my problem?

2008-03-13 Thread Anstis, Michael (M.)
[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

[rules-users] RE: Can I use drools to solve my problem?

2008-03-10 Thread Anstis, Michael (M.)
:[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

RE: [rules-users] Making my own agenda Filter

2008-03-10 Thread Anstis, Michael (M.)
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

[rules-users] FW: Can I use drools to solve my problem?

2008-03-07 Thread Anstis, Michael (M.)
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

RE: [rules-users] Plz reply : Descending order rule

2008-02-21 Thread Anstis, Michael (M.)
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:

RE: [rules-users] Plz reply : Descending order rule

2008-02-21 Thread Anstis, Michael (M.)
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

RE: [rules-users] Plz reply : Descending order rule

2008-02-21 Thread Anstis, Michael (M.)
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

RE: Re[rules-users] te Tree view ... tutorial?

2008-02-11 Thread Anstis, Michael (M.)
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

RE: [rules-users] compare string and int in LHS

2008-02-08 Thread Anstis, Michael (M.)
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   2   >