Re: [rules-users] Connection with Active Directory multiple organizational units
I'm having the same issue. Whats the fix to the login-config.xml? thanks -- View this message in context: http://drools.46999.n3.nabble.com/Connection-with-Active-Directory-multiple-organizational-units-tp907892p3445180.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] JBRULES-3260: Events forced to zero expirationOffset
Hi Robert, Good catch. I fixed this and will commit it in a few minutes. It will be included in the next release. You will be able to download fixed binaries from hudson or you can build them yourself. Edson 2011/10/22 Robert Crawford > It seems like ever since I found this, I can't stop tripping this > condition. > > Basically, while adding the DRL files to the KnowledgeBuilder, > ReteooRuleBase decides it has to reconcile event definitions from different > "packages", so it looks for any that are assignable. At first I thought > this > was just a guard against having a parent expire quicker than a child class > and breaking rules for the child. But now I'm getting this condition for A > SINGLE CLASS WITH NO INHERITANCE. > > At the root of the problem is ReteooRuleBase line 477: > node.setExpirationOffset( Math.max( node.getExpirationOffset(), > typeDeclaration.getExpirationOffset()+1 ) ); > > Since neither node nor typeDeclaration have declared expirations, they both > have expirationOffset values of -1. The code evaluates: > > max(-1, -1 + 1) > > sets the expirationOffset for node to zero, and from then on my objects are > expired literally as I insert them. > > If someone could more clearly state the conditions that trip this code, I'd > do my best to avoid them. I've already eliminated inheritance among my > events, but that doesn't seem to be enough. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/JBRULES-3260-Events-forced-to-zero-expirationOffset-tp3444069p3444069.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 > -- 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
Re: [rules-users] Define global variables at the top of a rules file
Hi, Wolfgang, I was not aware of this sophisticated way of handling conditions in Drools :) Maybe I've missed this part in the documentation :) Thanks for your response, Martin 2011/10/22 Wolfgang Laun > There is no way the truth of true can be changed and, by definition, when > there is no change in the condition there is no chance for another firing of > the rule. All Production Systems are alike in this respect. > -W > > > 2011/10/22 Martin A > >> Hello, >> >> Thanks for your response! >> >> But I don't understand why such a rule with a high salience which looks >> like: >> >> global int VARIABLE; >> >> rule "init" >> salience 999; >> when >> (eval(true)) >> then >> VARIABLE = 1; >> end >> >> would fire only once? >> >> Thank you, >> Martin >> >> >> 2011/10/20 Wolfgang Laun >> >>> You can do this by setting the global from a high salience rule from >>> within your DRL. Leave the conition empty - such a rule only fires once. >>> -W >>> >>> 2011/10/20 Martin A >>> Hello, I'd like to set global rules variables at the top of a rules file, like so: global int WELCOME_SCREEN = 1; so that I may easily refer to them from inside the rules, instead of hardcoding them somewhere in code. Is this possible? Best regards, Martin ___ 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 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
Re: [rules-users] check if a Enum object is present in condition
Hi, Ansgar, Thanks for your prompt response :) I was actually referring to enum literals. Now it works! Thanks, Martin 2011/10/22 Ansgar Konermann > > Am 22.10.2011 20:28 schrieb "Martin A" : > > > > > Hello, > > > > I try to put a condition in my LHS, such as: > > > > rule "initial_playground_dialog" > > #agenda-group "firstTimeUser" > > #salience 99 > > when > > $gst : > GameStateController(!hasEventOccurred("initial_playground_dialog")) > > $list : List() > > $screen : FrontendScreen.PLAYGROUND > > then > > > > end > > > > where 'FrontendScreen' is an enum and PLAYGROUND is its property. > > Is it actually a property of an enum or rather one of the enum literals? > > If it is actually a property, you will need to obtain an instance of the > FrontendScreen enum first. If PLAYGROUND is actually an enum literal and you > want to bind this literal to a variable, use: > > $screen: FrontendScreen( this == FrontendScreen.PLAYGROUND ) > > Regards > > Ansgar > > > However I get a syntax error. What's the proper way to check for and > assign such a session object? > > > > Any help is appreciated! > > > > Best regards, > > Martin > > > > ___ > > 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] JBRULES-3260: Events forced to zero expirationOffset
It seems like ever since I found this, I can't stop tripping this condition. Basically, while adding the DRL files to the KnowledgeBuilder, ReteooRuleBase decides it has to reconcile event definitions from different "packages", so it looks for any that are assignable. At first I thought this was just a guard against having a parent expire quicker than a child class and breaking rules for the child. But now I'm getting this condition for A SINGLE CLASS WITH NO INHERITANCE. At the root of the problem is ReteooRuleBase line 477: node.setExpirationOffset( Math.max( node.getExpirationOffset(), typeDeclaration.getExpirationOffset()+1 ) ); Since neither node nor typeDeclaration have declared expirations, they both have expirationOffset values of -1. The code evaluates: max(-1, -1 + 1) sets the expirationOffset for node to zero, and from then on my objects are expired literally as I insert them. If someone could more clearly state the conditions that trip this code, I'd do my best to avoid them. I've already eliminated inheritance among my events, but that doesn't seem to be enough. -- View this message in context: http://drools.46999.n3.nabble.com/JBRULES-3260-Events-forced-to-zero-expirationOffset-tp3444069p3444069.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] check if a Enum object is present in condition
Am 22.10.2011 20:28 schrieb "Martin A" : > > Hello, > > I try to put a condition in my LHS, such as: > > rule "initial_playground_dialog" > #agenda-group "firstTimeUser" > #salience 99 > when > $gst : GameStateController(!hasEventOccurred("initial_playground_dialog")) > $list : List() > $screen : FrontendScreen.PLAYGROUND > then > > end > > where 'FrontendScreen' is an enum and PLAYGROUND is its property. Is it actually a property of an enum or rather one of the enum literals? If it is actually a property, you will need to obtain an instance of the FrontendScreen enum first. If PLAYGROUND is actually an enum literal and you want to bind this literal to a variable, use: $screen: FrontendScreen( this == FrontendScreen.PLAYGROUND ) Regards Ansgar > However I get a syntax error. What's the proper way to check for and assign such a session object? > > Any help is appreciated! > > Best regards, > Martin > > ___ > 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
Re: [rules-users] Define global variables at the top of a rules file
There is no way the truth of true can be changed and, by definition, when there is no change in the condition there is no chance for another firing of the rule. All Production Systems are alike in this respect. -W 2011/10/22 Martin A > Hello, > > Thanks for your response! > > But I don't understand why such a rule with a high salience which looks > like: > > global int VARIABLE; > > rule "init" > salience 999; > when > (eval(true)) > then > VARIABLE = 1; > end > > would fire only once? > > Thank you, > Martin > > > 2011/10/20 Wolfgang Laun > >> You can do this by setting the global from a high salience rule from >> within your DRL. Leave the conition empty - such a rule only fires once. >> -W >> >> 2011/10/20 Martin A >> >>> Hello, >>> >>> I'd like to set global rules variables at the top of a rules file, like >>> so: >>> >>> global int WELCOME_SCREEN = 1; >>> >>> so that I may easily refer to them from inside the rules, instead of >>> hardcoding them somewhere in code. Is this possible? >>> >>> Best regards, >>> Martin >>> >>> ___ >>> 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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] check if a Enum object is present in condition
Hello, I try to put a condition in my LHS, such as: rule "initial_playground_dialog" #agenda-group "firstTimeUser" #salience 99 when $gst : GameStateController(!hasEventOccurred("initial_playground_dialog")) $list : List() $screen : FrontendScreen.PLAYGROUND then end where 'FrontendScreen' is an enum and PLAYGROUND is its property. However I get a syntax error. What's the proper way to check for and assign such a session object? Any help is appreciated! Best regards, Martin ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Define global variables at the top of a rules file
Hello, Thanks for your response! But I don't understand why such a rule with a high salience which looks like: global int VARIABLE; rule "init" salience 999; when (eval(true)) then VARIABLE = 1; end would fire only once? Thank you, Martin 2011/10/20 Wolfgang Laun > You can do this by setting the global from a high salience rule from within > your DRL. Leave the conition empty - such a rule only fires once. > -W > > 2011/10/20 Martin A > >> Hello, >> >> I'd like to set global rules variables at the top of a rules file, like >> so: >> >> global int WELCOME_SCREEN = 1; >> >> so that I may easily refer to them from inside the rules, instead of >> hardcoding them somewhere in code. Is this possible? >> >> Best regards, >> Martin >> >> ___ >> 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