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: rule

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 som

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 excl

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. -Origi

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 Subject:

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

2009-09-16 Thread Anstis, Michael (M.)
;-) -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] Applying rules on xml data Hi, you will need to create POJOs out

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 i

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: [rules-us

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: rules-user

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? From:

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 gai

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 int

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

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

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

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

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

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

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] 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 on

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 u

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] 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 Hey

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? Rene, mhhm, what are your trying to do (besides storing rules in a rdbms)? What's the use-case? -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun

RE: [rules-users] How to use Drool Inference instead of SQL's

2009-03-30 Thread Anstis, Michael (M.)
This might be of interest http://www.jboss.org/community/docs/DOC-11909 -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of JohnSood Sent: 30 March 2009 13:20 To: rules-users@lists.jboss.org Subject: [rules-users] How to u

RE: [rules-users] Facing severe issues while using Persistence

2009-03-30 Thread Anstis, Michael (M.)
This looks like a JPA issue; have you configured your PersistenceUnit? I haven't used EclipseLink but in other IDE's you can create a PU graphically. There's always persistence.xml to fall back to as well. Looks like EclipseLink can't find a PU definition.

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 t

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] running a small set of rules from a drl file.

2009-03-20 Thread Anstis, Michael (M.)
You could consider Agenda Groups. You could either bunch groups of rules into discrete sets or have each rule in its own Agenda Group. You would then use workingMemory.setFocus(...) before calling fireAllRules(). This is based upon 4.x and so could be different in 5 (which I haven't had time

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: 1

RE: [rules-users] Identify Rule on Attributes

2009-03-13 Thread Anstis, Michael (M.)
t is possible through RETE algo 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

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 de

RE: [rules-users] Drools connectivity with mainframes

2009-02-26 Thread Anstis, Michael (M.)
This isn't really anything to do with Drools though. Drools rules could simply use "from" to invoke methods on a proxy that hides your mainframe connectivity (which would be the same for any Java application). From: rules-users-boun...@lists.jboss.org [

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: rules-

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

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 r

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] 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.) wrote: Hi David, Sorry it was of little help.

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

2009-01-29 Thread Anstis, Michael (M.)
easoner(Calendar.getInstance()).lessThan($expires)) then // do something for when credit card is still valid end Now, I'm still generally a noob with BRs, so I'm not sure how this will affect performance. Any advice? Than

RE: [rules-users] Parsing XML using Drools

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

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] 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: rules-users-boun...@lists.jbo

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] Reasoning over hierarchies.

2009-01-21 Thread Anstis, Michael (M.)
I wonder whether a custom accumulate function could be used to move your logic out of the object model? Not that accumulate was (probably) meant for this sort of function but the "init" method could create the empty set and "accumulate" perform your iteration below? Just the musing of an idle m

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

2009-01-21 Thread Anstis, Michael (M.)
Rules that are not in any explicit user-defined Agenda Group belong implicitly to the MAIN Agenda Group which is the last Agenda Group to trigger activations when all others have completed. Provided ALL of your rules belong to an explicit Agenda Group you should be able to setFocus(...) to Group A

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.)
e don't want to execute a group of rules if a rule A is not matched : 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 bei

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 execut

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 Obv

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] [mailto

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 exam

RE: [rules-users] object creation

2008-08-21 Thread Anstis, Michael (M.)
You could use a global as OutputObject instead of a Fact. If you want to use properties of OutputObject in a LHS pattern you'll need to use "from" but this is not indexed and so using the two rules with a fact approach might give better performance in this case.

RE: [rules-users] Can drools comtinue testing even if one of theconditions fail ?

2008-08-15 Thread Anstis, Michael (M.)
Please don't cross post: http://www.jboss.org/drools/lists.html IMO, Drools can do what you want but you need to change the way you are thinking about the problem. The behaviour you consider undesirable is by design as all patterns (i.e. conditions) need to be matched for the consequence to acti

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 gi

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

2008-08-12 Thread Anstis, Michael (M.)
ert)? Again, really appreciate your answers a lot!Thanks Paul Anstis, Michael (M.) wrote: > > OK, so here is my take on things:- > > +--+ ++ +---+ > | | || | | > | Sub-syste

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

2008-08-12 Thread Anstis, Michael (M.)
OK, so here is my take on things:- +--+ ++ +---+ | | || | | | Sub-system 1 |-->| Sub-system 2 |-->| Sub-system 3 uses | | sets up data | | Rules \ Drools | | results from sub- | +--

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] 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 wit

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

2008-08-11 Thread Anstis, Michael (M.)
_ De : [EMAIL PROTECTED] [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 documen

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 S

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 B

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 perf

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 Heh

RE: [rules-users] determinism with rulebase partitioning

2008-07-31 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 user-def

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

2008-07-30 Thread Anstis, Michael (M.)
orkingMemory Thanks for the prompt response. In the example bellow one can see that list1 items 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 un

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] 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 O

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 200

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

2008-07-22 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 O

RE: [rules-users] How to check for a variable number of "conditions" ina rule?

2008-07-22 Thread Anstis, Michael (M.)
Hi Ron, Have a look at the "Alarms" example for "Collect" in the (4.0.5) manual. This should give you a good starting point. Cheers, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Kneusel Sent: 22 July 2008 23:01 To: rules-users@lists.jboss.o

[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

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: [E

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

2008-07-08 Thread Anstis, Michael (M.)
searched through the doc for drools, 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

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 fo

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

2008-07-08 Thread Anstis, Michael (M.)
Have a look at an example posted earlier this week whereby somebody (sorry I forget who) was using JPA from within a rule. Once you understand how JPA was used then the remaining questions relate more specifically to JPA. As Mark says, (native) Hibernate can also be used very easily. With kind r

RE: [rules-users] Calling EntityManager from DRL--DRL Parser attemptsto parse sql query instead of passing as string tocreateNativeQuery method

2008-07-07 Thread Anstis, Michael (M.)
Keyword "From" allows for the retrieval of facts from outside the rule engine, whereas "memberOf" works upon fact attributes. So these would (should!) be other alternatives:- when $p : Property() from (em.createNativeQuery("select PROP from SAMPLEOBJECT").getResultList())) SampleObject(

RE: [rules-users] simple rule takes long time

2008-07-02 Thread Anstis, Michael (M.)
Hi, Rules are not executed as Facts are inserted into Working Memory. Basically, think of the Working Memory as a network of connected classes ("The RETE network"). As facts are inserted into Working Memory they enter the top of the network and propagate through it depending upon the patterns wit

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

2008-06-26 Thread Anstis, Michael (M.)
Somewhat better than my reply, now where was that stone I crawled from under? ;-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kris Verlaenen Sent: 26 June 2008 15:49 To: Rules Users List Subject: Re: [rules-users] Stateless session and rule flows Use

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] [mailto:[EM

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 than

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 Tha

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] 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() So

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

2008-05-02 Thread Anstis, Michael (M.)
for expressing my formulae - if that can be achieved using a DSL. 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" sec

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

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 = RuleBaseFactory.ne

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.)
hould work I think. 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 dbut

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 pr

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 dbutils.getNumbe

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 was inserting them more 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

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 : MyVariable(uniqu

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] [mail

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] 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 othe

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] 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 Subje

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] 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 O

  1   2   3   >