[rules-users] are activated working sets persisted?
Hi all, here is my question: are activated working sets persisted in drools repository? In my guvnor instance, logging out from current browsing session does reset activated working sets for my rules.. Is this intended? Guvnor user manual says real-time validation is not persisted, so I guess the same apply on activated working sets. Thanks in advance! Gab -- View this message in context: http://drools.46999.n3.nabble.com/are-activated-working-sets-persisted-tp3510552p3510552.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Enumerations for nested classes
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 Program','XYZ=Second Program'] [Promotion.program.code] = ['ABC=First Program','XYZ=Second Program'] With decision table they work as expected, but in BRL rules only the first works (the one with no nested classes), while in the other case the drop-down list doesn't appear and it's shown only a free editable field. How can it be? Should I write something in a different way? Is it a bug? I'm using version 5.2. Thanks in advance. -- View this message in context: http://drools.46999.n3.nabble.com/Enumerations-for-nested-classes-tp3494392p3494392.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Setting category tags programmatically
Hi all, my application needs several hundreds rules to implement its business logic. We generated such rules from a legacy database using a few sql scripts, since the relevant tables contained the business configuration constraints for the app, and then added them to Guvnor by means of the eclipse plugin. Is it possible to set category tags programmatically for that rules artifacts in Guvnor? Possibly a script or some java api? Thanks in advance, Gab -- View this message in context: http://drools.46999.n3.nabble.com/Setting-category-tags-programmatically-tp3413214p3413214.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Eclipse Java compliance
Figured out the problem: I let my default eclipse.ini, so that it was picking up a default java vm from my program files, more specifically a java 1.5 vm. Just added -vm option (and right path to 1.6 vm) to my ini file and it solved the problem. I can't understand why I had no problems in all my projects, but only on drools rules. Hope this helps. Cheers, Gab -- View this message in context: http://drools.46999.n3.nabble.com/Eclipse-Java-compliance-tp3191021p3195479.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Eclipse Java compliance
Hi, I'm new to Drools. I searched on the topics but I couldn't find anything useful. --- My environment is Windows 7 64bit Java 1.6 jdk Eclipse SDK 3.6 JBoss Tools 3.2.0 with latest drools plugin. Drools 5.2 runtime When I try to create a new Drools Project from eclipse ide, I get the following error for each rule file: test/rule/Rule_A_stand_alone_rule_0DefaultConsequenceInvoker : unsupported classversion 50.0 If I change java compiler compliance to 1.5 I get rid of errors, but because of project policy I can't set 1.5 compliance level. What could be wrong in my ide or project config?? Thanks in advance, Gab -- View this message in context: http://drools.46999.n3.nabble.com/Eclipse-Java-compliance-tp3191021p3191021.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] looking for more information on drools expert
Thank you very much for the precision, I didn't see that. I used 'matches' instead of '==', because using '==' for comparing Strings in java is very unsafe since it compares the references and not the content of the strings. I thought it was the same in drools and I thought 'matches' was the equivalent of the java '.equals' method. But now you mention that in drools '==' is correct, I will use it rather. Aldian 2009/7/16, Edson Tirelli : >Very good! :) > >Just FYI, in the case of accumulate, you could also use the collectList() > function to simplify your rule. This: > > $alarmList : LinkedList() > from accumulate ( ($e : Element(parentindex!=0) and > $a : Alarm( origin matches > $e.name&& probablecause==45)), > init( LinkedList alarmList = new > LinkedList();), > action( alarmList.add($a);), > reverse( alarmList.remove($a);), > result( alarmList ) ); >Is the same as: > > $alarmList : List() > from accumulate ( ($e : Element(parentindex!=0) and > $a : Alarm( origin matches > $e.name&& probablecause==45)), > collectList( $a ) ); > >Also, you can always implement your own functions for accumulate: > > http://blog.athico.com/2009/06/how-to-implement-accumulate-functions.html > >Finally, I see you are using "matches" operator to compare equal strings. > Not sure if that is what you want, because "==" has different semantics and > better performance than "matches" if what you really want is compare > equality. Remember that in regexps, some characters have special meaning, > for instance, "." is a wildcard for any character. Meaning: > > "abc" matches "a.c" -> true > "abc" == "a.c" -> false > >Cheers, >Edson > > > > 2009/7/16 Gab Aldian > >> After some more investigation, I managed also to make it work with >> collect: http://drools.pastebin.com/m14f0e329 >> >> I would rather not multiplicate rules, because we probably will have >> dozens for our system which is very big and can supervise around a >> thousand equipements in some cases >> >> Thank you very much for the advices >> >> Aldian >> ___ >> rules-users mailing list >> rules-users@lists.jboss.org >> http://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Edson Tirelli > JBoss Drools Core Development > JBoss by Red Hat @ www.jboss.com > ___ rules-users mailing list rules-users@lists.jboss.org http://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] looking for more information on drools expert
After some more investigation, I managed also to make it work with collect: http://drools.pastebin.com/m14f0e329 I would rather not multiplicate rules, because we probably will have dozens for our system which is very big and can supervise around a thousand equipements in some cases Thank you very much for the advices Aldian ___ rules-users mailing list rules-users@lists.jboss.org http://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] looking for more information on drools expert
I finally suceeded to get what I wanted using the keyword accumulate which is really very poweful as said in the doc. Here is the rule: http://drools.pastebin.com/m4f938e40 It is a little bit complex, but it perfectly works. The only observation I have is that it seems drools compatible jdk is < 1.5, since I tryed to declare my linkedlist this way: LinkedList(), but got warnings about the unexpected '<'. One other thing, the "implicit and" does not work in the accumulate, you have to put it clearly. Now I have something giving me the list I need, all should be easy I think. Do you have any observation on the way I did it? Cheers Aldian ___ rules-users mailing list rules-users@lists.jboss.org http://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] looking for more information on drools expert
2009/7/15, Wolfgang Laun : > 2009/7/15 Edson Tirelli : >> >>Aldian, >> >>Yes, this is the way to go: >> >> rule "detect and set routers different from root for alarm 45" >> When >>* All routers which index is different from 0 are raising the alarm 45 >>* There is an alarm $a of numero 45 raised by an equipement $e >> different from the root >> Then >>* execute some specific code on ($a,$e) >> end >> >>It would be like this: >> >> when >> forall( $e1 : Equipment( index != 0 ) >> Alarm( origin == $e1.name, probablecause == 45 ) ) >> $e2 : Equipment( index != 0 ) >> $a2 : Alarm( origin == $e2.name, probablecause == 45 ) >> then >> // do something with $e2 and $a2 >> end >> > > What happens if the RHS contains a retract( $a2 ), which (I think) is > one of the things Aldian intends to do? > > Also, there is the requirement of inserting a summary alarm > replacing all the 45ers on non-root equipments. You may not > want to do this on the RHS, unless you rely on the engine > discarding fact duplicates. > Thank you for your answers. I am currently examining how to use the accumulate keyword. As for the alarms that have been correlated in only one, I don't know how they are dealt with commonly, but here are the problems we have seen: 1) In the hypothesis where a same single alarm could be correlated with different pairs to create correlated alarms in different cases, it would be careless to retract it after having been correlated one time, because it would block all further correlation 2) In the hypothesis where a correlated alarm sum of a lot of single one has been created and where an event is raised to tell that one of these alarms has fallen: Two possibilities: Introducing the notion of "correlated alarm partially cleared" or removing the correlated alarm and reintroducing its remaining components. If the correlation has been well done, it doesn't make sense to use the first possibility, because once the condition are no longer validated, there is no reason to display the correlated alarm any further. Here is the way we will deal with this: Currently there are two list of alarms in main class: a) the list of alarms that has been inserted to drools (including single and correlated ones) but not cleared yet b) the list of alarms that should be displayed to the operator. So basically, when we decide that a group of alarms should be correlated in only one, we remove them from the list (b) and we add to (a) and (b) a correlated one that contains all the group. When an event rise to signal that one alarm is no longer raised, all correlated alarms it is part of are destroyed and removed from both lists and all their components except the fallen one are re-added to list b. The mechanisms allowing this are based on the alarm keys that are unique and on some mappings. So as you see there is a distinction between what is in drools, and what is visible by the operator. All non cleared alarms (single and correlated) are permanently in drools until it is destroyed because it has been cleared. The only inconvenient is then to avoid the rules to fire indefinitely, since they are permanently susceptible to be validated. To avoid this all rules are of type "If some alarms respect the folowing conditions and at least one of them is not part of a correlated alarm built for this rule, then...". There are probably smarter ways to do, but this is my point of view for the moment. Cheers Aldian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] looking for more information on drools expert
for completeness, be careful with the semantics of time. > Your Alarm class is using the system clock to define timeout, and that will > give you all kinds of headaches, not to mention wrong/unexpected results. I suppose you say this because of the risk of unsynchronized clocks on the network? But for now I don't see how to improve that... > But this e-mail is already too long. I suggest you take a look at the Drools > Fusion docs on temporal reasoning. Thank you very much, I will take a look about this Regards Aldian > > 2009/7/10 Gab Aldian > >> Hi everybody >> >> I have read with attention the drools expert documentation, which was >> very interesting, but a little 'too simple". For example, most >> examples don't present rules with the keyword "forall". I also met big >> difficulties mixing the references on the objects to my javacode. This >> is why I would need some more documentation with examples that go >> deeper into drools capacities. >> >> >> To give you clues about my plan, here is an example (which works >> perfectly in drools 5) that I have developed: >> java code - http://drools.pastebin.com/m1a705614 >> rule code - http://drools.pastebin.com/m3f30cbdc >> >> As you can see I am studying the case where drools is used for the >> monitoring of a network of equipments that send alarms about their >> problems. But I have big difficulties, because I would like to get >> references on the objects of the "forall", and to execute javacode >> such as $toto.method($titi, $tata), but such things seems impossible >> (systematic failed of compilation) >> >> Could you please help me? >> >> Thank you very much! >> >> Aldian >> ___ >> rules-users mailing list >> rules-users@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Edson Tirelli > JBoss Drools Core Development > JBoss by Red Hat @ www.jboss.com > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] looking for more information on drools expert
Hi everybody I have read with attention the drools expert documentation, which was very interesting, but a little 'too simple". For example, most examples don't present rules with the keyword "forall". I also met big difficulties mixing the references on the objects to my javacode. This is why I would need some more documentation with examples that go deeper into drools capacities. To give you clues about my plan, here is an example (which works perfectly in drools 5) that I have developed: java code - http://drools.pastebin.com/m1a705614 rule code - http://drools.pastebin.com/m3f30cbdc As you can see I am studying the case where drools is used for the monitoring of a network of equipments that send alarms about their problems. But I have big difficulties, because I would like to get references on the objects of the "forall", and to execute javacode such as $toto.method($titi, $tata), but such things seems impossible (systematic failed of compilation) Could you please help me? Thank you very much! Aldian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] new to drools: can't manage to find the documentation page about eclipse plugin installation
Thank you very much, I made it working using a similar manual procedure. But that is unbelievable that there is no documentation about this. Regards Aldian 2009/7/2 Ross H > I just unzip it and place into the dropins folder in eclipse. So you have > the following folders: > eclipse > - dropins > - drools-5.0-eclipse-all > > works nicely. > > I use the j2e version of ganymede - that probably has GEF. > > 2009/7/2 Gab Aldian > >> Hi everybody >> >> I am very sorry to ask for something so simple like this, but I just can't >> manage to find the page about how to install and use the eclipse plugin for >> drools. >> >> there: >> http://download.jboss.org/drools/release/5.0.1.26597.FINAL/drools-5.0-eclipse-all.zip >> I can find a zip file with only some jars, a licence and a dependencie >> readme, but no clue on how to install >> >> there: http://www.jboss.org/community/wiki/JBossRules >> We learn that GEF is required, and that for the installation, we have to >> refer to the manual >> >> and there: >> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch07.html >> a note says to refer to the installation chapter >> >> >> Problem: I didn't find any installation chapter in the whole doc ( >> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/index.html) >> So here is my question: Where is that page that explain how to install >> that plugin? I spent a lot of time looking for it, and either it I am blind, >> or it is well hidden >> >> Thank you very much >> >> Aldian >> >> ___ >> rules-users mailing list >> rules-users@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] new to drools: can't manage to find the documentation page about eclipse plugin installation
Hi everybody I am very sorry to ask for something so simple like this, but I just can't manage to find the page about how to install and use the eclipse plugin for drools. there: http://download.jboss.org/drools/release/5.0.1.26597.FINAL/drools-5.0-eclipse-all.zip I can find a zip file with only some jars, a licence and a dependencie readme, but no clue on how to install there: http://www.jboss.org/community/wiki/JBossRules We learn that GEF is required, and that for the installation, we have to refer to the manual and there: http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/ch07.html a note says to refer to the installation chapter Problem: I didn't find any installation chapter in the whole doc ( http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html/index.html) So here is my question: Where is that page that explain how to install that plugin? I spent a lot of time looking for it, and either it I am blind, or it is well hidden Thank you very much Aldian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: I am looking for the full sourcecode of the fibonacci and helloWorld examples of the documentation
Hi all I don't understand how I managed to not see it. I am really blind. I t was there: http://download.jboss.org/drools/release/4.0.7.19894.GA/drools-4.0.7-examples.zipin the center of the welcome page of drools. Sorry for the useless question 2009/4/29 Gab Aldien > Hi everybody > > I have spent a lot of time trying to get drools examples working with > drools4. I have read the appropriate section in the manual, but it doesn't > provide the full sourcecode of the examples, and I can't manage to find it > on the web. Could someone tell me where I will find their full sourcecode? > Thank you very much. > > Aldian > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Unable to load dialect 'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel error
Hi I had the same problem earlier today. I replaced mvel.jar by mvel-1.3.1-java1.6.jar and it suppressed the exception. Aldian 2009/4/26 > Hi, > > I am using Drools 4.0.7 and was able to successfully create a > knowledgebase. I am trying to install the knowledgebase in tomcat/axis2. I > am running into problems here. The exception is below: > > org.drools.RuntimeDroolsException: Unable to load dialect > 'org.drools.rule.build > er.dialect.mvel.MVELDialectConfiguration:mvel' > at > org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBui > lderConfiguration.java:160) > at > org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigura > tionMap(PackageBuilderConfiguration.java:146) > at > org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderCo > nfiguration.java:121) > > > The files in the lib directory in the aar file are below: > > C:\Users\rsundaar\projects\temp\SimpleService>jar tvf SimpleService.aar > 0 Sat Apr 25 21:23:36 EDT 2009 META-INF/ > 71 Sat Apr 25 21:23:36 EDT 2009 META-INF/MANIFEST.MF > 0 Sat Apr 25 07:14:54 EDT 2009 com/ > 0 Sat Apr 25 07:14:54 EDT 2009 com/satsoc/ > 0 Sat Apr 25 08:20:12 EDT 2009 com/satsoc/prototype/ > 1216 Sat Apr 25 07:54:36 EDT 2009 com/satsoc/prototype/Message.class > 2293 Sat Apr 25 21:22:14 EDT 2009 > com/satsoc/prototype/SimpleService.class > 0 Thu Apr 23 06:34:56 EDT 2009 conf/ > 0 Sat Apr 25 20:29:14 EDT 2009 lib/ > 92015 Sat Mar 21 17:06:18 EDT 2009 lib/antlr-runtime.jar > 109131 Fri Mar 20 23:56:50 EDT 2009 lib/drools-analytics-4.0.7.jar > 10618 Fri Mar 20 23:56:50 EDT 2009 lib/drools-ant-4.0.7.jar > 560267 Fri Mar 20 23:56:50 EDT 2009 lib/drools-compiler-4.0.7.jar > 1096031 Fri Mar 20 23:56:48 EDT 2009 lib/drools-core-4.0.7.jar > 78626 Fri Mar 20 23:56:48 EDT 2009 lib/drools-decisiontables-4.0.7.jar > 23499 Fri Mar 20 23:56:48 EDT 2009 lib/drools-jsr94-4.0.7.jar > 13749 Sat Mar 21 17:06:18 EDT 2009 lib/jsr94.jar > 121070 Sat Mar 21 17:06:18 EDT 2009 lib/junit.jar > 499068 Sat Mar 21 17:06:18 EDT 2009 lib/jxl.jar > 870188 Sat Mar 21 17:06:18 EDT 2009 lib/mvel.jar > 12745047 Sat Mar 21 16:55:50 EDT 2009 lib/org.drools.eclipse_4.0.7.jar > 4372548 Sat Mar 21 15:35:48 EDT 2009 > lib/org.eclipse.jdt.core_3.4.4.v_894_R34x.j > ar > 895924 Sat Mar 21 17:06:18 EDT 2009 lib/xercesImpl.jar > 109318 Sat Mar 21 17:06:18 EDT 2009 lib/xml-apis.jar > 119888 Sat Mar 21 17:06:18 EDT 2009 lib/xpp3.jar > 24677 Sat Mar 21 21:53:52 EDT 2009 lib/xpp3_min.jar > > > I have looked through some of the earlier postings. Based on that I have > made sure, mvel.jar and org.eclipse.jdt.core_3.4.4.v_894_R34x.jar are in the > lib directory and still get the same error. > > Any clues? I would appreciate any help I can get from you!! > > Thanks, > Ravi. > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] I am looking for the full sourcecode of the fibonacci and helloWorld examples of the documentation
Hi everybody I have spent a lot of time trying to get drools examples working with drools4. I have read the appropriate section in the manual, but it doesn't provide the full sourcecode of the examples, and I can't manage to find it on the web. Could someone tell me where I will find their full sourcecode? Thank you very much. Aldian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] ascendant compatibility drools 4.0 <-> drools 2.0 ?
Hi everybody Short presentation since this is my first time posting there. I am a french engineering student at the end of his studies, and I am currently working as a trainee on a project where I have to make a lot of software working together. I am currently studying a way to correlate alarms sent by a lot of equipements from a network (type NMS), using openOSS' correlation module, which was using drools 2.0 beta 2.1 But since it seems the current stable version is drools 4.0, I am thinkint about using it instead. But if I do so, I will have to bother about ascendant compability. The programm from openOSS is using drools through JSR94 interface. Do you think there will be any problem? Where can I find a good page relating major changes in drools since drools 2.0? Other question: my project is really ambitious, and I plan to use rules which will adapt to the topology of the network. Depending on what is possible in drools, I am thinking about creating a program which will use a file containing static rules and another one containing the topology of the network to remotely generate new rules each time I change the network topology. But maybe this dynamic rule generation is already available in drools? What do you think? Thank you very much Aldian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users