[rules-users] How to write Drools rule basing on a changed property?

2011-11-09 Thread kapokfly
Requirement: 1) Rule When Person.address.address1 is changed THEN 2) Ideally we should have 2 objects, 1 for the old person instance, the other for the new person instance so contextually the LHS equals to oldPerson.address.address1 != newPerson.address.address1. A

Re: [rules-users] How to write Drools rule basing on a changed property?

2011-11-09 Thread Wolfgang Laun
The agent that is responsible for the address change must take care to provide information about what it does. This could be done by creating an UpdateEvent fact referencing the Person fact and indicating the attribute (address). Or a listener reacts to the change and insert the UpdateEvent fact.

Re: [rules-users] Data Modeling for medical expert system

2011-11-09 Thread Davide Sottara
Hi Dirk, you might want to take a look at this: http://www.jboss.org/tohu This is an interesting but rather old project. We're also working on a slightly refactored version here: https://github.com/droolsjbpm/drools-chance/tree/master/drools-informer The project provides a dynamic

Re: [rules-users] How to write Drools rule basing on a changed property?

2011-11-09 Thread kapokfly
Thanks, when I am saying person address is changed, our app only concerns about its initial value and its final value, any change in the middle, we don't care. Examples: person.address.address1 starts with 'my addr1' later a couple of changes were made, say its final value is 'my

Re: [rules-users] Issues with Eclipse Excel Plugin for Drools Decision Tables

2011-11-09 Thread Vincent LEGENDRE
Don't use eclipse to edit Excel files. Use Excel. I've never managed to make this OLE editor works well (but it is a long long time I did not retry, although I don't think there is any major evolution of this editor since then) . You can instruct Eclipse to use Excel to edit your .xls files (see

Re: [rules-users] Data Modeling for medical expert system

2011-11-09 Thread Dirk Conzelmann
Hi Davide and the other users too, thank you all for your interesting links. I´ll think that 'tohu' really seams the solution for that problem. I think it is rather interesting that after spending my first weeks on Drools reading the documentation I never saw any link pointing to 'tohu'.

Re: [rules-users] Data Modeling for medical expert system

2011-11-09 Thread Dirk Conzelmann
Hi Bruno, On Tue, 08 Nov 2011 18:46:45 +0100, Bruno Freudensprung wrote: Hi Dirk, Good to see that I am not the only one fighting with that question :-). I guess the general answer is: it depends on how large your enums might grow. For instance if your application is eventually

[rules-users] Human Task - ERROR : JPAKnowledgeService.newStatefulKnowledgeSession ...

2011-11-09 Thread S.M.H.Jamali
Hello all, I get an exception while last line of below method executed :     public StatefulKnowledgeSession createSession() throws Exception {                 /*          * Create the knowledgebase using the required bpmn and drl files          */         KnowledgeBase kbase =

Re: [rules-users] How to write Drools rule basing on a changed property?

2011-11-09 Thread Wolfgang Laun
It seems that this is more of a technical problem on the Java side: how to register the fact that a certain property of an element has changed. You'll need somthing like a clone method. The old version of Person need and should not remain in Working Memory, but a simple wrapper fact referencing

Re: [rules-users] Bugs in Drools 5.3.0 break Fusion event processing

2011-11-09 Thread Edson Tirelli
Richard, This is great info. Yes, please open JIRA's for all 3 issues and we will make sure this is fixed for the next release. Thank you, Edson 2011/11/9 Richard Calmbach rcalm...@gmail.com I am making extensive use of the event processing features of the Drools rule engine.

[rules-users] variables confusion Java/MVEL

2011-11-09 Thread elsdestickere
Hi, I'm confused about when en where to use Java or MVEL in a rule. In the example below I want to replace openRes.getMasterExemplaar().getBruikbareExemplaren() with a variable. RHD: works with JAva expression: ListExemplaar bruikEx =

Re: [rules-users] Bugs in Drools 5.3.0 break Fusion event processing

2011-11-09 Thread Vincent LEGENDRE
Just wondering : does these problems happends because you use clocks and jobs, or is it general to fusion 5.3 ? Did not migrate my project on 5.3 for now. So do you think there is a risk, knowing that I only use very basic fusion features ? - Mail original - De: Edson Tirelli

Re: [rules-users] variables confusion Java/MVEL

2011-11-09 Thread Wolfgang Laun
You cannot create variables on the Left Hand Side; there you can only bind (!) variable names (!) to matched facts or their attributes. -W On 9 November 2011 15:14, elsdestickere elsdestick...@yahoo.com wrote: Hi, I'm confused about when en where to use Java or MVEL in a rule. In the example

[rules-users] newbie: Can rules planner provide me with the single-steps to the optimal binpacking solution ?

2011-11-09 Thread Itai Frenkel
Hello, I would like to solve a 2D binpacking problem. I have an existing bin-packing solution and would like to make it more optimized. Each change (movement of items between bins) has a certain cost, and I would like to have a list of the least-cost path. There is more than one solution that

Re: [rules-users] Issues with Eclipse Excel Plugin for Drools Decision Tables

2011-11-09 Thread Andreas Schlüter
Thanks for the feedback, I'll do it as you propose (although it is convenient for debugging the decision table to be able to stay in Eclipse). It looked to me as if it were part of the drools tooling since the editor opened up directly after creation of the decision table using the drools plugin,

[rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected

2011-11-09 Thread dcrissman
Drools Version: 5.1 (We are looking into upgrading, but not an option at this time) I have need of a rule flow that will allow a diverge on one-to-many paths and then converge and continue on only once the paths that were executed have all finish. Say I have path A, B, C. The constraints on the

Re: [rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected

2011-11-09 Thread Swindells, Thomas
Can you split it into two separate diverges? Diverge to B first and always follow the other path which then does the A C, Similarly at the other end wait for A C and then a second wait to add in the condition for B. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org

Re: [rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected

2011-11-09 Thread dcrissman
Swindells, Thomas wrote: Can you split it into two separate diverges? Diverge to B first and always follow the other path which then does the A C, Similarly at the other end wait for A C and then a second wait to add in the condition for B. Thomas I am not sure I entirely follow

Re: [rules-users] newbie: Can rules planner provide me with the single-steps to the optimal binpacking solution ?

2011-11-09 Thread Geoffrey De Smet
Drools Planner can solve this problem for you. Here's a presentation that shows the code for a 3D bin packing problem: http://www.slideshare.net/ge0ffrey/judcon-london-2011-bin-packing-with-drools-planner-by-example To try it yourself, download the planner zip and run the example

Re: [rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected

2011-11-09 Thread FrankVhh
Hi, I do not reallt know whether there is a native way in jBPM to implement the m out of n-case you are describing. Anyway, imho, the easiest way to roundtrip this is probably this: Create a series of simple decision gateways: If(A has to execute), fire A; else do nothing; If (B has to execute);

Re: [rules-users] How to write Drools rule basing on a changed property?

2011-11-09 Thread kapokfly
Yes, that is a Map base approach I am thinking. Now more questions: global MapObject, Object oldObjectContext WHEN $person: Person() eval(((Person)oldObjectContext[$name]).jobTitle == $person.name) THEN Q1: without eval, the compiler will report error Q2: without type cast, the compiler

[rules-users] rule does not fire at first event

2011-11-09 Thread ukriegel
Hi there, we use drools fusion 5.3. Final. In a drl-file, a fact and an event and the following rules are declared package ... etc declare ActivityState @role(fact) state : StateType end rule set initial state dialect java salience 100 when not (exists

[rules-users] Security test cases for Drools

2011-11-09 Thread kapokfly
Not sure if anyone can share their experiences what kind of test cases on Drools security should be developed and ensured? As the rule is just a piece of codes in String format which can be hooked into JVM, we can assume that might open some holes and necessary security test cases need to be

[rules-users] integrate guvnor UI into your own application

2011-11-09 Thread kapokfly
Anyone tried to integrate the guvnor UI into your own application? Basically we want to have a integrated, uniformed UI with our application rather than a separate one like Drools Guvnor does... -- View this message in context:

Re: [rules-users] Human Task - ERROR : JPAKnowledgeService.newStatefulKnowledgeSession ...

2011-11-09 Thread Mauricio Salatino
You will need to solve that problem. looks like a configuration problem, can you share the persistence.xml file? did you configure persistence with JTA? Cheers 2011/11/9 S.M.H.Jamali cpp...@yahoo.com Hello all, I get an exception while last line of below method executed : public

Re: [rules-users] integrate guvnor UI into your own application

2011-11-09 Thread Esteban Aliverti
If your application is a web application then you can try this solution: http://ilesteban.wordpress.com/2010/11/23/guvnor-embed-assets-editor-in-your-application/ Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @

Re: [rules-users] Security test cases for Drools

2011-11-09 Thread Edson Tirelli
Against external attacks, Drools supports knowledge base signing and checking using standard asymmetric keys infrastructure. Regarding the web application, I will let one of the guvnor guys to talk about. Against internal attacks, i.e., someone deliberately adding a malicious rule into the

Re: [rules-users] rule does not fire at first event

2011-11-09 Thread Mauricio Salatino
Are you calling the fireAllRules() method after inserting the events? or using fireUntilHalt()? You can activate the log to see what is happening with: KnowledgeRuntimeLoggerFactory.newConsoleLogger(session); Cheers On Wed, Nov 9, 2011 at 1:37 PM, ukriegel ulrich.krie...@isst.fraunhofer.dewrote:

Re: [rules-users] integrate guvnor UI into your own application

2011-11-09 Thread kapokfly
Nice, will give a try. Another 2 questions you might be able to help: 1) The Guvnor UI is basing on technical models which is hard for a business user to understand, especially when the current technical models implementation is not so good (for example, not straightforward relationship etc), is

Re: [rules-users] Security test cases for Drools

2011-11-09 Thread kapokfly
Thanks Edson. We are developing a web based UI (if possible embed guvnor into our application) and open the ability to customers to define their own rules, so a company policy on this won't work. Will evaluate other concern points and have more discussions on this. Ivan -- View this message

Re: [rules-users] Issues with Eclipse Excel Plugin for Drools Decision Tables

2011-11-09 Thread Andreas Schlüter
Actually, your proposal does not work as expected: While Eclipse is open, it locks the file. If I edit it with Excel, be it directly from the OS or via configuration of the filetype, I therefore cannot save it. So it is like change the excel file-startup eclipse -click refresh - get compilation

[rules-users] Enumerations for nested classes

2011-11-09 Thread gab
Hi all, I have a problem with data enumeration for nested classes in BRLs. I have two classes, Promotion and Program. Promotion has a property named program of type Program, which has a string property called code. I did a couple of enumeration in this way: [Program.code] = ['ABC=First

Re: [rules-users] Issues with Eclipse Excel Plugin for Drools Decision Tables

2011-11-09 Thread Vincent LEGENDRE
Eclipse does not lock files, none of them, including xls ... May be you have an excel process still in execution (not killed by buggy OLEEditor) that keeps some locks ? OOTB Eclipse ? don't know what it is, but may be the problem is here ? I do use Excel spreadsheet in real applications. But

Re: [rules-users] Enumerations for nested classes

2011-11-09 Thread Vincent LEGENDRE
bug : https://issues.jboss.org/browse/GUVNOR-1573 fixed in 5.3 But I think you does not need your second enum. Guvnor will infer that (in 5.3). - Mail original - De: gab acque_profo...@yahoo.it À: rules-users@lists.jboss.org Envoyé: Mercredi 9 Novembre 2011 19:26:00 Objet: [rules-users]

Re: [rules-users] Data Modeling for medical expert system

2011-11-09 Thread Davide Sottara
Tohu is a relatively old, unofficial and inactive project. We're refactoring that as drools-informer, but that's work in progress and I'm not sure the jQuery web client that comes with tohu would still work. So I'd recommend to stick to tohu for your thesis (especially giving your time constraints

Re: [rules-users] integrate guvnor UI into your own application

2011-11-09 Thread Michael Anstis
1) You can put a bridge\adapter layer in between your object model and that used in Guvnor, but there is nothing in Guvnor itself. 2) Guvnor does support field expressions in the BRL (Business Rule - Guided Editor). When defining a field constraint select Expression. There were some good

Re: [rules-users] variables confusion Java/MVEL

2011-11-09 Thread Els Destickere
Thanks for the insight, br, Els --- On Wed, 11/9/11, Wolfgang Laun wolfgang.l...@gmail.com wrote: From: Wolfgang Laun wolfgang.l...@gmail.com Subject: Re: [rules-users] variables confusion Java/MVEL To: Rules Users List rules-users@lists.jboss.org Date: Wednesday, November 9, 2011, 3:35 PM You

[rules-users] [Planner] CachedMoveFactory drive to Corrupted undo move

2011-11-09 Thread npiedeloup
Hello, I'm almost new to Drools Planner, and i run into some problems. One of them, I really want to understand is that my Planner works well until i try to use a CachedMoveFactory instead of my MoveFactory, then i've got Corrupted undo move at step 2. Assigment are my PlanningEntity, Day are

Re: [rules-users] Bugs in Drools 5.3.0 break Fusion event processing

2011-11-09 Thread Richard Calmbach
Edson: Thanks for the quick reply. I created these JIRA issues: F1: Duplicate job scheduling in org.drools.time.impl.DefaultTimerJobInstance.call() - https://issues.jboss.org/browse/JBRULES-3284 F2: NullPointerException in

[rules-users] How to dynamically invoke a field or property into a fact and set rule on that field or property

2011-11-09 Thread srinivasasanda
Hello I have a problem please any one help me i have a field product type depending on product type i want to create new field or property or fact, and on the new field i want to give rules... please send me some example or link to lean and practice if we dynamically invoke the

[rules-users] RulesRepository usage - jar incompatibility issue

2011-11-09 Thread Praveen
Hi, I am trying to use RulesRepository to create a package and copy required assets (by using their uuid) into the created package. Below is the code snippet and the corresponding stack trace of the run-time exception being thrown. I would like to know the appropriate lucene-core jar to be used

Re: [rules-users] How to dynamically invoke a field or property into a fact and set rule on that field or property

2011-11-09 Thread Mauricio Salatino
Hi there, can you elaborate a little bit more on what are you trying to achieve. It's almost impossible to help with that generic description. You can write rules on your products that create and insert new facts pretty easily Rule categorize product no-loop when $p:Product(name ==

[rules-users] A little suggestion about the 'ResourceFactory', 'DrlParser' API

2011-11-09 Thread Miles Wen
Would you please provide a method in 'org.drools.io.ResourceFactory' like this: public static Resource newReaderResource(InputStream stream, String encoding); then I can use this method to load drl files as a stream while explicitly specify its ecoding? And in line: 287 of class

Re: [rules-users] How to dynamically invoke a field or property into a fact and set rule on that field or property

2011-11-09 Thread srinivasasanda
My requirement is if i select the product type mobile, or dth, or some other , then i will check one more rule if customer credit total is above 1000 etc.. then i want create a new fact or field . and on that field i want to keep rule and give some discount constraint as new rule I am new to

Re: [rules-users] How to dynamically invoke a field or property into a fact and set rule on that field or property

2011-11-09 Thread Mauricio Salatino
I suggest you to start simple. Just create a java project add the drools dependencies (knowledge-api, drools-core and drools-compiler), define your POJO classes that will represent your Domain model, for example: Product, Discount, Category, etc and then you can start writing your rules. When you

Re: [rules-users] rule does not fire at first event

2011-11-09 Thread ukriegel
After insertion of the event, fireAllRules() is called. In fact, there is in addition a default rule rule default dialect java when Command() from entry-point XXX then System.out.println(No reaction on Command +new Date()); end which fires with the same

Re: [rules-users] [Planner] CachedMoveFactory drive to Corrupted undo move

2011-11-09 Thread Geoffrey De Smet
Op 09-11-11 23:31, npiedeloup schreef: Hello, I'm almost new to Drools Planner, and i run into some problems. One of them, I really want to understand is that my Planner works well until i try to use a CachedMoveFactory instead of my MoveFactory, then i've got Corrupted undo move at step