[rules-users] Inconsistent behaviour of insertLogical in rules having from pattern

2014-08-28 Thread Vincent LEGENDRE
Hi all, It is 2 days I am fighting with a strange behaviour of insertLogical in rules having from pattern in conditions : it works the first time, and not after ... - Here is my use-case (simplified) : I have a class that represent a Flight. A Flight

Re: [rules-users] Inconsistent behaviour of insertLogical in rules having from pattern

2014-08-28 Thread Vincent LEGENDRE
Forgot to say : using drools 5.6.FINAL - Mail original - De: Vincent LEGENDRE vincent.legen...@eurodecision.com À: Rules Users List rules-users@lists.jboss.org Envoyé: Jeudi 28 Août 2014 15:28:49 Objet: [rules-users] Inconsistent behaviour of insertLogical in rules having from

Re: [rules-users] Rules storage without Guvnor?

2014-06-02 Thread Vincent LEGENDRE
Hi Guvnor implements a REST API that can be used to get a big DRL from ressources in a package. Most of time in my company's projects we used this API to get and store DRL files in a production environnement, with some dedicated code (no maven nor web in prod). It is almost as simple as

Re: [rules-users] Abstraction between rules and data model?

2014-06-02 Thread Vincent LEGENDRE
I have personnaly 2 ways of getting as far as possible from refactor problems : - mostly use flat objets, ie some objets that are as DB tables (only simple POJO with foreign keys, no child objects). This way it is easy to get and store used objects (with SQL or JPA frameworks, which has some

Re: [rules-users] Drools beginner - unable to resolve method using strict-mode

2013-04-11 Thread Vincent LEGENDRE
. thanks to all for your help! 2013/4/10 Davide Sottara dso...@gmail.com That rule style requires dialect mvel to be declared either at the rule level or globally in the DRL file, do you have that? Davide On 04/10/2013 08:41 AM, Vincent LEGENDRE wrote: blockquote I am

Re: [rules-users] Drools beginner - unable to resolve method using strict-mode

2013-04-10 Thread Vincent LEGENDRE
I am not that drools eclipse plugin is able to see DRL types if they are defined in a separate DRL file. But if your app works well, it is only that. If the type is really missing, you should encounter errors at runtime (when feeding the knowledge base) - Mail original - De: Stefan

Re: [rules-users] Abstracting Rules using extends

2013-04-08 Thread Vincent LEGENDRE
May be that the extends problem also comes from the fact that the rules are in separated files, and/or the order which they are given to the kbuilder (base rules must exists prior to rules exntending them). ___ rules-users mailing list

Re: [rules-users] Is Drools suitable for preprocessing my Resource Allocation Problem

2012-12-12 Thread Vincent LEGENDRE
Hi Raphael, There are multiple concerns mixed here, I don't know if this post would benefit of being cutted in at least 2 : 1- How drools works : read about RETE algorithm (wikipedia is a good start) and about drools-expert (core module that contains the engine, first chapter of the doc

Re: [rules-users] Is Drools suitable for preprocessing my Resource Allocation Problem

2012-12-10 Thread Vincent LEGENDRE
Hi I did not get the use case here. When you write : The Problem : I have an optimisation engine that can allocate some activities to some resources, while optimizing some KPIs (Key Performance Indicator). The optimizer takes as input (among others) a list of forbiden allocations that

Re: [rules-users] Newbie question - rule based technical drawing

2012-12-09 Thread Vincent LEGENDRE
Hi You should look at drools-planner and n-queens sample : http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html_single/#d0e914 - Mail original - De: Andreas Höhmann andreas.hoehm...@gmx.de À: rules-users@lists.jboss.org Envoyé: Samedi 8 Décembre 2012 19:04:19 Objet:

Re: [rules-users] Cutom Attributes in Drools

2012-09-13 Thread Vincent LEGENDRE
It is not a myth ... but indeed, it's hard. Most of times, you have to find one guy at client's side who is ready to learn at least the main principles of expert-systems. For my experience, it works well enough (ie most of rules dev time is done by the BA) in about 1 proj out of 3. For the

Re: [rules-users] Guvnor Declarative Model

2012-09-11 Thread Vincent LEGENDRE
It may be faster to get the drools source code and change the generation by yourself. And post the new code to Edson ... - Mail original - De: Jean-Paul Shemali jshem...@hotmail.com À: rules-users@lists.jboss.org Envoyé: Mardi 11 Septembre 2012 08:29:08 Objet: Re: [rules-users] Guvnor

Re: [rules-users] Guvnor Declarative Model

2012-09-10 Thread Vincent LEGENDRE
Ok, not simple indeed ... And why can't you generate a POJO instead of declarative fact ? - Mail original - De: Jean-Paul Shemali jshem...@hotmail.com À: rules-users@lists.jboss.org Envoyé: Lundi 10 Septembre 2012 10:06:43 Objet: Re: [rules-users] Guvnor Declarative Model Simply by not

Re: [rules-users] Guvnor Declarative Model

2012-09-08 Thread Vincent LEGENDRE
How can you declare your facts (or rules) if you don't know beforehand the structure of the POJO to use ? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Guvnor Declarative Model

2012-09-07 Thread Vincent LEGENDRE
a workaround could be to use a java pojo, not a declared fact - Original Message - From: Edson Tirelli ed.tire...@gmail.com To: Rules Users List rules-users@lists.jboss.org Sent: Friday, September 7, 2012 3:43:04 PM Subject: Re: [rules-users] Guvnor Declarative Model Ouch, more

Re: [rules-users] Without salience

2012-09-04 Thread Vincent LEGENDRE
If it works with salience, why change ? And why is the order so important ? Still trying to get the first occurence of an event of a given type/value ? It remembers me some not-so-old post ... - Mail original - De: salt writemesaltwo...@gmail.com À: rules-users@lists.jboss.org

Re: [rules-users] ClassNotFoundException

2012-09-03 Thread Vincent LEGENDRE
Are you sure that this specific jar/class does not depends of other external (from java/drools point of view) classes ? Does it work if you download the generated DRL, and compile/run it outside Guvnor ? - Mail original - De: devan vanreenen devan.vanree...@gmail.com À:

Re: [rules-users] Job Opportunity - Jboss, Drools, Java Architecht/Consultant

2012-08-30 Thread Vincent LEGENDRE
But it may be a horse anyway ... Let's say Anatolia is this list, and the horse the initial post. According to all the jobs available for that kind of profile around the world, it can be the first of a very long bunch of junk mails proposing a job that anyone here can find within a week ...

Re: [rules-users] rules not being reconsidered after modify

2012-08-30 Thread Vincent LEGENDRE
Hi, You must make a difference between facts and other objects (that you can get by bindings). facts are the objects inserted in the working memory. Only those objects can be matched directly in LHS. Other entities can be accessed by using attributes (of facts) bindings or from constructions

Re: [rules-users] Understanding Rules Firing Sequence

2012-08-29 Thread Vincent LEGENDRE
The learning is : for your case, where all your row in your table have an implicit priority and business logic, yes, don't hope that drools engine will guess that by itself. As far i understand, you expect the rules to trigger from top to bottom (or most specific to less), and stop when a

Re: [rules-users] Timer Cron reevaluating same facts again and gain

2012-08-29 Thread Vincent LEGENDRE
I expected only new facts to be evaluated as I'm running stateful session It only works this way if you let your session alive in a separate Thread, using fireUntilHalt(). If you use fireAllRules() (by instance each 5s), then yes, everything will be re-evaluated, just as if it were a new

Re: [rules-users] A few general questions on scaling StatefulKnowledgeSessions

2012-08-17 Thread Vincent LEGENDRE
If you do nothing heavy in the RHS, indeed, rules' action part execution is faster than fact insertion, but this is because of your design, not something relevant for all usages. In an inference system using RETE like drools, the most of time is spent to update the RETE network. Updates of

Re: [rules-users] Audit Logs: Business Case? Any pearls of wisdom?

2012-08-10 Thread Vincent LEGENDRE
I agree with Wolfgang on it is common sense to have audit logs for a real application, and of course the way to do it with listeners. Most of time, for my experience, these logs (which rule has triggered, what are the changes made (insert, retract, update...) ...) are simply dumped in the

Re: [rules-users] Best design pattern for: Set of events with countdown timers?

2012-08-10 Thread Vincent LEGENDRE
did you check here : http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-td3907955.html - Mail original - De: dunnlow dunn...@yahoo.com À: rules-users@lists.jboss.org Envoyé: Vendredi 10 Août 2012 16:19:33 Objet: [rules-users] Best design pattern for:

Re: [rules-users] Web decision tables (Guvnor)

2012-08-10 Thread Vincent LEGENDRE
Hi I was wondering why you need the otherwise here. May be it is only because you have simplified your sample, but the table you sent is like a truth-table telling what currency can be converted for a particular account. So, as you have a 2 state answer, you can simply add rules to specify the

Re: [rules-users] Matching consecutive events

2012-08-06 Thread Vincent LEGENDRE
May be something with the internal clock and timestamps assigned as events dates and inclusive (or not I don't remember) bounds in after/before operators evaluation ... in short, I am not sure of the expected result if all your event (or 2 among your 3 events) have the same event date. But

Re: [rules-users] Apply role to whole class hierarchy

2012-08-06 Thread Vincent LEGENDRE
I had the same strange problem some time ago (last winter), but I never managed to reproduce a small sample I checked, and my problematic class hierarchy also lived in different packages (and never tried that that for my smaller samples) . - Mail original - De: Joerg Henne

Re: [rules-users] Using Global Model for all packages

2012-07-24 Thread Vincent LEGENDRE
Never managed to get that working properly too ... 3 options : - Try again to really share the model from global area to all package. - Put the jars in Guvnor classpath (or tomcat classpath) - Write a REST client that upload the jar to all packages. - Mail original - De: starfish15

Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Vincent LEGENDRE
, or does it take place into another third-party framework (that could use a different or modified version of drools). org.tass.utils.ExpertSystemManager.java is our class. We aren't using third-party framework. Thank you Carolina 2012/7/23 Vincent LEGENDRE vincent.legen

Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Vincent LEGENDRE
@Vincent: I'm concerned about the first stack trace line, which is where no executable code can be. Clear this up first... Me ? Really no idea why this line ... This line, in 5.3 code, is the class declaration. Indeed, node an executable piece of code ... I've found another thread :

Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-24 Thread Vincent LEGENDRE
Our application is using this url: http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST to loading from Guvnor5.3.0 the pkg. Is it correct? Yes, to get the compiled package, compiled inside Guvnor , but this is the problem here. The compiled package is

Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-23 Thread Vincent LEGENDRE
are you sure that your SituationManager.createAccessControlEvent method returns something not null ? - Mail original - De: Carolina Pellecchia carolina.pellecc...@gmail.com À: Rules Users List rules-users@lists.jboss.org Envoyé: Lundi 23 Juillet 2012 12:44:28 Objet: Re:

Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)

2012-07-23 Thread Vincent LEGENDRE
There is another mystery : why this is working when getting rules from a DRL file and not from Guvnor ... Did you add the POJO model into the Guvnor's package ? But if this is it, package compilation should raise a compilation error ... What is sure is that the problem does not comes from the

Re: [rules-users] Web guided Decision table

2012-07-19 Thread Vincent LEGENDRE
predicate type column allow you to write anything, using $param placeholder to retrieve your cell's content. - Mail original - De: abhinay_agarwal abhinay_agar...@infosys.com À: rules-users@lists.jboss.org Envoyé: Jeudi 19 Juillet 2012 13:39:40 Objet: [rules-users] Web guided

Re: [rules-users] Web guided Decision table

2012-07-19 Thread Vincent LEGENDRE
or create a false setter in your POJO and modify it ... by instance by giving it the agenda-group you want to focus ... - Mail original - De: Michael Anstis michael.ans...@gmail.com À: Rules Users List rules-users@lists.jboss.org Envoyé: Jeudi 19 Juillet 2012 14:39:44 Objet: Re:

Re: [rules-users] drools-camel-server RetractAll() Command?

2012-06-27 Thread Vincent LEGENDRE
... and don't forget the 'Cleanup trigger' cleanup rule too ... You can also do that kind of rule without 'Cleanup trigger', using a very low salience, or specific agenda-group or ruleflow-group. But if you really retract ALL facts, it will be far much faster to create a new kSession (not a

Re: [rules-users] RuleFlow not Found

2012-06-26 Thread Vincent LEGENDRE
up to drools 5.1 (more or less), the new default is jbpm flows, for rules or not. JBPM let you do what you can do with former .rf files. To be shorter : It is the same, at least seen from a ruleflow usage. Before you ask : you need to add jbpm jars to your drools runtime in order to make the

Re: [rules-users] RuleFlow not Found

2012-06-26 Thread Vincent LEGENDRE
Yep, but this is because the sample is quite old now. If one day they decide to get rid with .rf files, it's better to start using jbpm format. Oh yeah, sample should be upgraded too ... - Mail original - De: paco fifi_nji...@yahoo.fr À: rules-users@lists.jboss.org Envoyé: Mardi 26

Re: [rules-users] Setting unused globals on a session

2012-06-24 Thread Vincent LEGENDRE
@gqmulligan : ... hum, you're rigth, Globals does not expose much ... use kSession.setGlobal(...) in a try catch if you want to stick to the API. @wolfgang : agreed ... ___ rules-users mailing list rules-users@lists.jboss.org

Re: [rules-users] drools-planner drl file help

2012-06-21 Thread Vincent LEGENDRE
... Should I repeat what Geoffrey told you in your previous thread ? Will you try again and again to post your project, hoping we will do your work for you ? I gave you the main ideas, first work with that, and come back with precise questions. - Mail original - De: Ricardo

Re: [rules-users] Setting unused globals on a session

2012-06-21 Thread Vincent LEGENDRE
I am not sure to have fully understood you last requirement, nor if you set the global inside or outside the rules. Anyway, I see these options : - declare your globals for all packages, but it seems that this is not what you want - enclose the global setting in a try...catch and just

Re: [rules-users] drools-planner drl file help

2012-06-20 Thread Vincent LEGENDRE
I am not sure to understand your problem exactly, and espacially chat you intend to do, but it is likely because you don't declare the suitable criterion so the solution you have (could help if you post it too) is equivalent (according to the score you define) to the expected one... If I try

Re: [rules-users] Hibernate Configuration with Drools 5.4

2012-06-19 Thread Vincent LEGENDRE
To me, the problem discussed in this thread highlights a deeper problem (more than DT compile time) : using DT as data storage is bad. Wolfgang's post demonstrate this fact. Previous posts demonstrate another problem : having 50k, 100k rules with the very same (basic) structure demonstrate

Re: [rules-users] java.lang.NullPointerException at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)

2012-06-19 Thread Vincent LEGENDRE
You could probably also consider simplifying the rule structure... many - if not all - the evals and explicit getters seem unneeded.. that would make the rule more efficient and definitely more readable. ... and will potentially protect against null usage in operations, like the operation

Re: [rules-users] Hibernate Configuration with Drools 5.4

2012-06-18 Thread Vincent LEGENDRE
Did you really send a 50k rows table to a personal email ??? I can't believe it ... I think you should : - read the mailing list rules - read the previous Wolfgang post telling that you should consider not using such big tables (consider a rule using your 50k rows as parameters) - ask

Re: [rules-users] Hibernate Configuration with Drools 5.4

2012-06-18 Thread Vincent LEGENDRE
fail gracefully, with an error message such as after umpteen zillion rules: out of memory and not just turn belly-up. After having received some feedback from the OP about alternative approaches I'll report back to the list. -W On 18 June 2012 19:26, Vincent LEGENDRE vincent.legen

Re: [rules-users] Is a single StatefulKnowledgeSession with Distributed Memory cache possible?

2012-06-14 Thread Vincent LEGENDRE
May be you can think differently : Instead of keeping all objects for 90 days, keep only the accumulate results for each previous day. - Mail original - De: chrisLi shengtao0...@163.com À: rules-users@lists.jboss.org Envoyé: Jeudi 14 Juin 2012 18:06:50 Objet: [rules-users] Is a single

Re: [rules-users] BigDecimal comparison

2012-06-10 Thread Vincent LEGENDRE
Done a little test using 3 approachs (with new BigDecimal(-12.321)), all are working: rule test big decimal 1 when Pojo(bigDecimal 0.0) then System.out.println(test big decimal 1); end rule test big decimal 2 when Pojo(bigDecimal.doubleValue 0.0) then

Re: [rules-users] Initial rule delay

2012-06-06 Thread Vincent LEGENDRE
In 5.4 timers support expressions for values. You can thus use a fact used to hold timer values (init and delay). This fact is created with some non-zero values, and reset all to zero once a first rule has triggered rule delayAtFirstTime timer(expr: $timerSpec.getDelay()+s , 0s) when

Re: [rules-users] Initial rule delay

2012-06-06 Thread Vincent LEGENDRE
Yes of course ... Simpler this way ... - Original Message - From: Wolfgang Laun wolfgang.l...@gmail.com To: Rules Users List rules-users@lists.jboss.org Sent: Mercredi 6 Juin 2012 18:02:40 Subject: Re: [rules-users] Initial rule delay Try: timer( int: initial 0 ) -W On 06/06/2012,

Re: [rules-users] Initial rule delay

2012-06-06 Thread Vincent LEGENDRE
the same effect as omitting the repeat-interval [Tested in 5.1 5.4]. Thanks Vincent, this seems to work. However I was hoping for a simpler solution :) - Paul On Wed, Jun 6, 2012 at 5:06 PM, Vincent LEGENDRE vincent.legen...@eurodecision.com wrote: Yes of course ... Simpler this way

Re: [rules-users] Drools Decision Table, multiple actions accumulation

2012-06-04 Thread Vincent LEGENDRE
The formula trick works : POI (api used inside drools) is reading values by default for cells (at least the last time I used that in 5.1 version). The main problem of this is when users adds new rows : you must ensure that formula are copied too and this lead to other dirtier tricks (like

Re: [rules-users] Drools Decision Table, multiple actions accumulation

2012-06-01 Thread Vincent LEGENDRE
... which would mean I should be able to pass the value present in both the columns in one method call. Or create a Pojo for your keys (you should have already one as java maps only have one key ...), instanciate it in the first column in a local (to RHS) variable, use setters to set

Re: [rules-users] how to use only updated value in drools

2012-05-29 Thread Vincent LEGENDRE
what is the initial value of b ? what are the salience of your rules ? and why not posting your rules directly ? - Original Message - From: learner anandbabu6...@yahoo.com To: rules-users@lists.jboss.org Sent: Mardi 29 Mai 2012 12:29:28 Subject: [rules-users] how to use only updated value

Re: [rules-users] getting mismatched '==' error

2012-05-29 Thread Vincent LEGENDRE
Your table seems correct, and writing a new one won't change the problem. But errors are reported according to the generated DRL, so it is hard to say which constraint is the problem. To generate the DRL, you can use SpreadsheetCompiler (or may be something more up-to-date?) like this :

Re: [rules-users] Can we retrieve the rules as XML from guvnor using java code?

2012-05-24 Thread Vincent LEGENDRE
Guvnor can provide rules to any instance, thus used as a shared repository... Are you trying to duplicate Guvnor rules from one Guvnor instance to another ? If yes : - You can use repository export / import (Administration panel under Guvnor) - You can use the REST api of Guvnor to query

Re: [rules-users] Exception on at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300) drools 5.0.1

2012-05-18 Thread Vincent LEGENDRE
When using or, only one pattern of the or expression will be bound. So, at runtime, onlty one variable $p1 or $p2 exists, and the other is null so the NPE at runtime. By the way, I can't see you are using a or here, as you test exactly the same things ... - Mail original - De: Joana

Re: [rules-users] Classnotfound exception on POJO model upload in guvnor

2012-05-18 Thread Vincent LEGENDRE
I think (not sure) that an uploaded jar must be complete by itself. The only things (classes) it can reference must be in guvnor's classpath (guvnor own libs and tomcat and java, but not current package other jars). So : - try using a single jar - or put all your jars in guvnor classpath

Re: [rules-users] Killing a session

2012-05-16 Thread Vincent LEGENDRE
I already used a global limit of rule's firing with success to prevent these kind of problems (with a big number, eventually calculated from rules as Wolfgang said). This works, at least to detect infinite loops, because usually, when this happend, the number of firing increases very fast so

Re: [rules-users] How to control the order of rule execution

2012-05-16 Thread Vincent LEGENDRE
*Questions:* 1st -What cud be d problems in the above case? .rf are not supported in guvnor. Use jbpm instead. See some previous (and numerous) posts ... 2nd- can I create a test case for our rule flow in guvnor and execute it? don't know if the session used for test scenario in guvnor use a

Re: [rules-users] Evaluation of the of rules with 'window:length' event windows

2012-05-16 Thread Vincent LEGENDRE
Seems that there is a confusion here ... window:length(X) is constraining the events timestamps to be in a time-windows of length X (in seconds). To contrain the number of accumulated facts, it must be done by adding a constraint in the resulting list : $list : ArrayList(size Nb) from

Re: [rules-users] Drools 5.0 how to create reports analytics on rules usage

2012-05-16 Thread Vincent LEGENDRE
heavilly discussed subjects ... This list should contain a lot of answers already ... To summarize : - user date/time when rule last changed : Can be got from Guvnor, if you are using it. If not, you have to plug something between your editor and your storage - date/time rule last

Re: [rules-users] Evaluation of the of rules with 'window:length' event windows

2012-05-16 Thread Vincent LEGENDRE
On 16/05/2012, Vincent LEGENDRE vincent.legen...@eurodecision.com wrote: Seems that there is a confusion here ... window:length(X) is constraining the events timestamps to be in a time-windows of length X (in seconds). Definitely not. It's window:time that restricts by a time interval. oups

Re: [rules-users] Evaluation of the of rules with 'window:length' event windows

2012-05-16 Thread Vincent LEGENDRE
ok, got it. not a strange construction, but a beautiful one !! thx - Mail original - If you want to have a list, you can have it in addition to count: accumulate( $w: Whatever(...) from window:length( 10 ), $count: count(1), $list: collectList( $w ),... )

Re: [rules-users] use of enum with in on LHS

2012-05-16 Thread Vincent LEGENDRE
Another potentiel trick : In State enum, add a method to build a State list from a list of string enum State { ... static ListState buildList(String listAsStr) { // well, don't need to detail that ... // ... but think to keep a cache somewhere to avoid unecessary

Re: [rules-users] Decision table call external method

2012-05-11 Thread Vincent LEGENDRE
According to your post, I guess that your problem is not really for editing the table, but at runtime the table does not behave like expected, yes ? Could you post your table and the resulting DRL, and explain a bit more what you have tried to do ? - Mail original - De: SuperGG

Re: [rules-users] Formula error in Business Rule(Guided editor)

2012-05-11 Thread Vincent LEGENDRE
$r.installations only works if the attribute is public in RuleObject (and numeric). try $r.getInstallations() instead ... Also, always have a look to the generated DRL (View Source under Guvnor) - Mail original - De: Manasi manasi.a.da...@capgemini.com À: rules-users@lists.jboss.org

Re: [rules-users] Decision table call external method

2012-05-11 Thread Vincent LEGENDRE
In ACTION, you can use : - static methods - non-static method on a previous matched objects using addNode(...) like this is nonsense, even in plain java If your addNode method applies to your matched Service object (which you binded to variable s), use s.addNode(...) Otherwise, you have

Re: [rules-users] Decision table call external method

2012-05-11 Thread Vincent LEGENDRE
, but it will be a trick ... - Mail original - De: Vincent LEGENDRE vincent.legen...@eurodecision.com À: Rules Users List rules-users@lists.jboss.org Envoyé: Vendredi 11 Mai 2012 15:06:35 Objet: Re: [rules-users] Decision table call external method In ACTION, you can use : - static methods

Re: [rules-users] Knowledge Base and Multiple Sessions

2012-05-11 Thread Vincent LEGENDRE
I would say no. I think that every session has its own RETE nodes filled with its own facts. May be the different RETE instances share some evaluators (or at least generated dynamic classes that represent nodes) so it could use a bit less memory than recreating the same kbase again and again

Re: [rules-users] Multiple DRL for one Package

2012-05-11 Thread Vincent LEGENDRE
I think that RETE is stored in kbase, and kPackage contains only some kind of AST for rules. So adding some rules (of same package or not) in a kbase (or a kbuilder) don't use the origin .. And mroe than that, I am pretty sure that rules are shared in RETE even if they are from different

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-10 Thread Vincent LEGENDRE
ok thanks. seems dangerous anyway .. and you said should be possible, which is (according to what I know in english) not really sure ? - Mail original - De: Davide Sottara dso...@gmail.com À: rules-users@lists.jboss.org Envoyé: Mercredi 9 Mai 2012 23:50:54 Objet: Re: [rules-users] Is

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
Users changing rules IS the correct use-case of drools (I would even say that if rules never change, drools is likely to be worse than pure java). What others said is changing the rules at each request by regenerating and recompiling is not. I can't imagine that users may change rules at each

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
At this point I'm designing for the worst case i.e., I'm assuming the rules with change with every request. Keeping a cache will work for the worst case, but will work faster for normal (see below) cases. You can imagine the user changing these rules in a span of less than a minute.

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
I did not assume that I've seen all use cases, nor that what I am a telling is the absolute truth. See no offense in my previous post. Yes, I was supposing some use case of my own experience, but please note it is the first post when you describe what you are really trying to do, ie

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
And I did not see all pending posts ... By reading them, there is another fact that lead to don't use drools. You said that you query a distant DB. So, if you write rules to filter your data, you will have first to get ALL data from your distant DB, add ALL data in the drools WM, and only then

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
... OR load everything into a WM and then apply these dynamic rules. Beware, I am not sure whether we can add/remove rules in an existing session (I don't think so but I may be wrong). Basically, a WM is built from a kBase, not the inverse ... So you will have to recompile rules, that re-add

Re: [rules-users] agenda-groups

2012-05-07 Thread Vincent LEGENDRE
I am having an issue where I have a catch all retraction rule setup as the lowest salience. Not sure to understand that (note that I am not english native ...) I see activations created for the facts but they are never fired. Any thoughts on why this may happen? Send some rules.

Re: [rules-users] Automatic PDF rule documentation does not include dsl based business rules

2012-05-02 Thread Vincent LEGENDRE
Are you sure that your rule compiles without errors ? If the doc generation uses verifier, rules must first pass the raw compilation ... - Mail original - De: ssprick s.spr...@tiq-solutions.de À: rules-users@lists.jboss.org Envoyé: Mercredi 2 Mai 2012 15:04:01 Objet: Re: [rules-users]

Re: [rules-users] Dynamically create drools mvel rules

2012-04-27 Thread Vincent LEGENDRE
Have a look to : - templates : http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html#d0e7413 - fluent API - generate DRL, or XML, or use internal Guvnor classes to do so In fact, while searching for links to put there (with google), I found this 'not so old'

Re: [rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Vincent LEGENDRE
JavaBeans convention : all default constructible and plenty of setters (for writeable properties) and getters (for readeable properties) - Mail original - De: Michael Anstis michael.ans...@gmail.com À: Rules Users List rules-users@lists.jboss.org Envoyé: Jeudi 26 Avril 2012 15:40:27

Re: [rules-users] Guvnor guided editor and non argument constructor

2012-04-26 Thread Vincent LEGENDRE
On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE vincent.legen...@eurodecision.com wrote: JavaBeans convention : all default constructible and plenty of setters (for writeable properties) and getters (for readeable properties) - Mail original - De: Michael Anstis michael.ans

Re: [rules-users] Best practice for 0..1 relations

2012-04-25 Thread Vincent LEGENDRE
The fact that you can bind from a constant is good to know. But if I can give my feeling, I don't think that this more readable nor more maintainable. To me, if you really want to factorize, using accumulate is better ... Mark's rule has a relatively big an complex 'then' part that justify an

Re: [rules-users] please provide a rule for events timeout cases

2012-04-24 Thread Vincent LEGENDRE
and thanks for providing feedback ! - Mail original - De: skatta1986 shivaprasad_...@yahoo.co.in À: rules-users@lists.jboss.org Envoyé: Mardi 24 Avril 2012 16:08:02 Objet: Re: [rules-users] please provide a rule for events timeout cases thanks for the reply its giving expected results

Re: [rules-users] Rules and Ruleflow GroupS

2012-04-23 Thread Vincent LEGENDRE
No you can't ... or I really don't know how .. You can duplicate a ruleflow group in a ruleflow (if your rule is only dependant of others rules in the same group), but if a rule is a subpart of multiple groups ... well ... I think you can't avoid to write your own agenda filter, or try to use

Re: [rules-users] Rules and Ruleflow GroupS

2012-04-23 Thread Vincent LEGENDRE
lookup values. Regards, Armand -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Vincent LEGENDRE Sent: Monday, April 23, 2012 9:26 AM To: Rules Users List Subject: Re: [rules-users] Rules and Ruleflow GroupS No you

Re: [rules-users] Best practice for 0..1 relations

2012-04-23 Thread Vincent LEGENDRE
In fact, you question is : What's the best way to define something that's needed in the RHS but is not matchable in the LHS? You said not important, but you want the income to be updated (I guess for other rules' LHS) ... so it was not clear. And what about using an accumulate rather than a

Re: [rules-users] please provide a rule for events timeout cases

2012-04-20 Thread Vincent LEGENDRE
And make sure to use '==' when testing for equality! Oh yes of course !! Did not noticed ... ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] please provide a rule for events timeout cases

2012-04-19 Thread Vincent LEGENDRE
without the error trace, hard to say why it crashes ... But your rules can be simplified/clarified : - and to connect conditions is not needed - in your first 'not' condition, which you add to test that no other event takes place between the two objects matched in previous patterns, you

Re: [rules-users] Sir, Seekin your's Help on Drool

2012-04-18 Thread Vincent LEGENDRE
You said that you will stick to the norms here but you do the opposite in your post : Where are the rules ? As far I can guess from all you wrote so far, the errors you have are all easily fixable by reading the very basis of drools doc, like what is a field constraint, how to specify it and

Re: [rules-users] Best way to write a rule where pattern has multiple constraints

2012-04-18 Thread Vincent LEGENDRE
First approach is more like a quick-n-dirty trick. It only works if you are sure that only one RuleContext exists in the working memory. If not ... the rule will lead to really strange results ... The real question is why you have rules like that, what was the initial justification? To me it

Re: [rules-users] Trying to compare variables of two objects, not working. (compiles, but not desired result)

2012-04-13 Thread Vincent Legendre
Le 13/04/2012 10:46, Wolfgang Laun a écrit : 5.3.0 and 5.4.0.Beta2: Comparing int and Integer fails unless the traditional (up to 5.1.1) return value construct - parentheses around the expression - is used: lineItemId == ($lineItem.getID()) // OK lineItemId == ($id) // OK with $id

Re: [rules-users] Trying to compare variables of two objects, not working. (compiles, but not desired result)

2012-04-12 Thread Vincent LEGENDRE
I think (not sure) that the problem comes from the right part of your test : $lineItem.ID Try with $lineItem.getID(), or use 'dialect mvel' as rule property You can also bind the id in LineItem and test it in the next pattern : rule Test when $lineItem : LineItem( $lineID : ID 0

Re: [rules-users] Trying to compare variables of two objects, not working. (compiles, but not desired result)

2012-04-12 Thread Vincent LEGENDRE
Integer.valueOf(1) (that will return a shared instance of Integer). But this is still very strange as doing the same test in java works (Integer is treated as a int, and == is testing values ...) - Mail original - De: Vincent LEGENDRE vincent.legen...@eurodecision.com À: Rules Users List rules

Re: [rules-users] Return List of Fired Rule Name from Decision table

2012-04-09 Thread Vincent Legendre
-- Vincent LEGENDRE Consultant Snior EURODECISION 9A rue de la Porte de Buc 78000 VERSAILLES Tl. : +33 (0)1 39 07 12 40 Direct : +33 (0)1 39 07 26 16 www.eurodecision.com

[rules-users] Fwd: Re: make the Guvnor interface into French

2012-04-07 Thread Vincent Legendre
This is exactly what I did. This procedure works like a charm. You said a lot of errors ? I can't be possible :) !! Did you tag your corrections ? the NWELL ? Message original Sujet: Re: [rules-users] make the Guvnor interface into French Date : Fri, 6 Apr 2012 21:27:47

Re: [rules-users] In drools what is the exact difference between Insert and Update ??

2012-03-29 Thread Vincent LEGENDRE
Far much valuable reply than mine :) A great summary of common concerns that must be evaluated before starting coding a rule system. Also consider : - using rule flow (if you are allowed to) - use sequential mode and pipe your data 'in the next rule box' programmatically (using rules?)

Re: [rules-users] In drools what is the exact difference between Insert and Update ??

2012-03-29 Thread Vincent LEGENDRE
with the recommendation you made. Patrik Dufresne On Thu, Mar 29, 2012 at 8:21 AM, Vincent LEGENDRE vincent.legen...@eurodecision.com wrote: Far much valuable reply than mine :) A great summary of common concerns that must be evaluated before starting coding a rule system. Also consider : - using rule flow

Re: [rules-users] In drools what is the exact difference between Insert and Update ??

2012-03-28 Thread Vincent LEGENDRE
Quick summary of : http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-expert-docs/html_single/index.html#d0e5989 insert = inserts a new object in the working memory update = tells the engine that an existing object in the working memory has changed Unexpected question from someone that

Re: [rules-users] Data comparing in CONDITION column decision table

2012-03-22 Thread Vincent Legendre
Thanks for the warning, some old bugs appears clearer now !!! Is it planned in a near future to only exclude the constraint and not the whole fact pattern ? To me, it seems more accurate to do this way. Le 19/03/2012 22:57, Michael Anstis a écrit : This is true, but be aware that if a cell

  1   2   >