Re: [rules-users] Diff between Drools opensource and Redhat BRMS
It's a little out of date now (2011), as jBPM5 is now supported in BRMS5.3. But the essence of the article is the same. http://blog.athico.com/2011/04/drools-jbpm-community-versus-product.html Mark On 25/07/2012 22:35, wbohrer wrote: > I couldn't find a FAQ, so please don't hate on me if this is one of "those" > questions :-) > > Quick question: What do you get with Redhat BRMS that you don't get from > the opensource version of Drools and Guvnor? Is the only difference > support? > > thanks, > Bill Bohrer > BRMS architect/analyst > Texas Education Agency > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Diff-between-Drools-opensource-and-Redhat-BRMS-tp4018907.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Diff between Drools opensource and Redhat BRMS
I couldn't find a FAQ, so please don't hate on me if this is one of "those" questions :-) Quick question: What do you get with Redhat BRMS that you don't get from the opensource version of Drools and Guvnor? Is the only difference support? thanks, Bill Bohrer BRMS architect/analyst Texas Education Agency -- View this message in context: http://drools.46999.n3.nabble.com/Diff-between-Drools-opensource-and-Redhat-BRMS-tp4018907.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] Drools Planner JIT selectors
I learned from the following link, this sounds very good for performance, this is available from 5.5 only, when can we expect the Drools Planner 5.5. Do you have any idea about the release date? http://planet.jboss.org/post/scaling_planner_with_jit_selectors_in_memory_consumption_and_performance thanks, - with kind regards, -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-JIT-selectors-tp4018906.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] Compiled rules differ KnowledgeAgent vs ResourceChangeScanner
I had time to download 5.4.0 Final this morning and using the current release, my unit tests pass. Sorry to waste people's time with a bug on an old release. Maybe this thread will be useful to others who have older release levels. -- View this message in context: http://drools.46999.n3.nabble.com/Compiled-rules-differ-KnowledgeAgent-vs-ResourceChangeScanner-tp4018608p4018904.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] Compiled rules differ KnowledgeAgent vs ResourceChangeScanner
I posted a JIRA for this bug: https://issues.jboss.org/browse/JBRULES-3584 https://issues.jboss.org/browse/JBRULES-3584 I attached a zip file of a Netbeans project that reproduces the bug and also demonstrates some workarounds. -- View this message in context: http://drools.46999.n3.nabble.com/Compiled-rules-differ-KnowledgeAgent-vs-ResourceChangeScanner-tp4018608p4018903.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] Remove rule but timer still fires
I just noticed a very similar observation in this JIRA entry: https://issues.jboss.org/browse/JBRULES-3078 When I ran that test case with 5.4.0.Final it worked as it should (the timer didn't continue to fire). The difference is that the this test case is calling: kbase.removeRule( pkgName, ruleName ); where I'm calling: org.drools.rule.Package pkg; pkg.removeRule( rule ); Changing my code to call kbase.removeRule() got rid of the timer!! Awesome! - Ladd -- View this message in context: http://drools.46999.n3.nabble.com/Remove-rule-but-timer-still-fires-tp4018509p4018902.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] Guvnor search for rules based on fact attributes
drools-verifier (the scaffolding thereof at least) could be used in principle. drools-verifier builds an AST of a rule's definition that is then evaluated by some bundled validation\verification rules. In principle you could use the AST and your own rules to perform a search. Guvnor uses JCR and Lucene to perform the search based on the rules' content (sometimes DRL sometimes XML, depending on how the rule is expressed internally). You could, in principle, extend this however you're not really getting anything better than regex on the DRL with the associated issues you have already identified. Lots of "in principles" but worth a look... :) With kind regards, Mike On 25 July 2012 11:02, Stephen Masters wrote: > Hi folks, > > I have been asked by my current client to evaluate search functionality > which could in essence search for rules which are affected by a particular > fact value. > > For example, if we have a number of rules similar to the following format: > > when > $req : TradeRequest(account = 10, buyCurrency = 'EUR', buyAmount > > 500) > then > TradeValidationResponse response = new TradeValidationResponse(); > response.setPermitted(false); > response.setMessage("Account 10 is not permitted to trade more > than 500 EUR"); > insert(response); > end > > What the client is interested in is being able to search for all rules > which have been defined for account 10. > > I was thinking to mess around with a rather quick and dirty solution to > grab the package source via the REST interface and pattern match rules in a > very hard-coded way for this specific use-case. However, that does look > like a rather fragile way of achieving this. > > So I was wondering whether anybody had looked at this sort of idea > previously and might have thoughts on a 'better' or more generic solution, > which wouldn't be massively complicated. I was thinking that it might be > nice to extend the search mechanism in Guvnor so that I could pick a fact > from the model and do a search for all rules which are based on the value > of an attribute. However, every time I think about how that could be > achieved, it seems I come up with new ways in which it would become really > difficult to pull off. > > Any thoughts? > > Cheers, > > Steve > > ___ > 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] Slow compilation (4h) for a single rule
Thank you all for your feedback, I will try to implement at least the part of collapsing the multiple evals() into a single one. Edson Tirelli-4 wrote > >Also, I just read the example in your link where you have multiple > accumulates in a single rule... that is *bad* > The accumulate() over-usage is a known problem for me, but so far the best solution for my case was proposed by "Vincent Legendre" on this http://drools.46999.n3.nabble.com/drools-arithmetics-without-eval-tp3823232p3825280.html post . As a comic note, the previous rule with the 26 ORs, had 26 accumulates on it :) Best regards, TL -- View this message in context: http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018900.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] Slow compilation (4h) for a single rule
Listen to what others are saying in this thread... it is very good advice, specially what wolfgang suggests bellow regarding collapsing evals. Also, I just read the example in your link where you have multiple accumulates in a single rule... that is *bad* For those that attended or saw my presentation on best practices, an easy way to estimate the performance of accumulates is to remember that the performance of accumulates in a single rule is polinomial: O(n^a), where "n" is the number of matching facts and "a" is the number of accumulates you have in the same rule. So, if you have 1 rule with 5 accumulates, the performance will be n^5. If instead you break the accumulates into 5 rules with one accumulate each, you get a performance of O(5n) that is much better. Edson On Wed, Jul 25, 2012 at 7:42 AM, Wolfgang Laun wrote: > A last effort from my side. > > Given any number of bound variables a, b, c: to determine whether an > arbitrary boolean expression involving arithmetic and comparison > operators, a single eval() is sufficient and preferable to a CE > combination involving the CE operators "and", "or", "not" combining > many evals. > > Instead of >not( eval( a == 1 ) ) > use >eval( ! (a == 1) ) // or better >eval( a != 0 ) > > Instead of > eval( a == 1 ) or eval( b == 1 ) > use >eval( a == 1 || b == 1 ) > > Instead of > eval( a == 1 ) and eval( b == 1 ) > use >eval( a == 1 && b == 1 ) > > -W > > On 25/07/2012, fx242 wrote: > > Thanks for your explanation Edson, it makes sense now I think! > > Basically what you are saying is that there is a limit, beyond which is > no > > longer feasible to use more ORs on a rule. > > > > > > Edson Tirelli-4 wrote > >> > >> You are trying to avoid the issue. As reported by others, your > >> conditions should be inside the patterns, not in "or'd" evals in the > end, > >> and yes, it is possible to generate rules like that in an automated > >> program. > >> > > > > Sadly I don't see how, as some of my rules have arbitrary arithmetic > > involving more than one variable inside the Number(), for more context > see > > the example I've put on > > > http://drools.46999.n3.nabble.com/drools-arithmetics-without-eval-td3823232.html > . > > > > For this case I think I will try to invert the logic and get rid of the > > ORs: > > not(A or B) => not(A) and not(B). > > > > Best regards, > > TL > > > > > > > > > > -- > > View this message in context: > > > http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018894.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 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] Moving comment in DSLR file causes issue under 5.3
Thanks. I think this is actualy a bug in 5.3. I wonder if there is an issue with the mvel getting unsynchronized as files get larger? The # should indicate a comment and > should indicate something passed thru to DROOLS directly. So almost the entire rule is commented out. I am particuarly puzzled why moving the offending statement to the left hand side removes the 2 errors - "fp1 cannot be resolved to a variable" and "x cannot be resolved to a variable". -- View this message in context: http://drools.46999.n3.nabble.com/Moving-comment-in-DSLR-file-causes-issue-under-5-3-tp4018882p4018898.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] Slow compilation (4h) for a single rule
A last effort from my side. Given any number of bound variables a, b, c: to determine whether an arbitrary boolean expression involving arithmetic and comparison operators, a single eval() is sufficient and preferable to a CE combination involving the CE operators "and", "or", "not" combining many evals. Instead of not( eval( a == 1 ) ) use eval( ! (a == 1) ) // or better eval( a != 0 ) Instead of eval( a == 1 ) or eval( b == 1 ) use eval( a == 1 || b == 1 ) Instead of eval( a == 1 ) and eval( b == 1 ) use eval( a == 1 && b == 1 ) -W On 25/07/2012, fx242 wrote: > Thanks for your explanation Edson, it makes sense now I think! > Basically what you are saying is that there is a limit, beyond which is no > longer feasible to use more ORs on a rule. > > > Edson Tirelli-4 wrote >> >> You are trying to avoid the issue. As reported by others, your >> conditions should be inside the patterns, not in "or'd" evals in the end, >> and yes, it is possible to generate rules like that in an automated >> program. >> > > Sadly I don't see how, as some of my rules have arbitrary arithmetic > involving more than one variable inside the Number(), for more context see > the example I've put on > http://drools.46999.n3.nabble.com/drools-arithmetics-without-eval-td3823232.html. > > For this case I think I will try to invert the logic and get rid of the > ORs: > not(A or B) => not(A) and not(B). > > Best regards, > TL > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018894.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
Hi everyone! we have made other tow tests: 1 - As suggested by Vincent, we have just used the source gets from Guvnor and all work fine. In addition, it would seem that putting observations and events in the same package all work fine!!! 2 - We have tried to put the observation in the same packet of event in the model and the new drl becomes: from *package* org.dfms.model; to *package* org.dfms.model.situation; from* import* org.dfms.model.observation.ACObservation; to *import* org.dfms.model.situation.ACObservation; * * *import* org.dfms.model.situation.AccessControlEvent; *import* org.dfms.model.situation.SituationManager; *import* org.dfms.model.situation.Event; *import* org.dfms.model.mapfeature.AccessControlPoint; *import* com.vividsolutions.jts.geom.Point; *import* com.vividsolutions.jts.geom.Geometry; *import* java.util.HashSet; *import* java.util.ArrayList; *declare* ACObservation @role(event) *end* *declare* AccessControlEvent @role(event) *end* *rule* "AccessControl" *no-loop* *when* $obs : ACObservation( $sensorid : sensorId, $location : location ) over window:length(1) *from* entry-point access_control *then* *insert*( SituationManager.createAccessControlEvent( $obs, "Access Control Detection", Event.THREAT_NO, $location, $sensorid )); *end* then we have loaded the pkg from Guvnor (by this link http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST ) into our application and all work fine!!! Thank you and best regards. Carolina 2012/7/24 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 a serialized kPackage object. When you get this > from guvnor, and put it inside your kBase, the object is simply > deserialized. The ObjectTypeConf conf.getTypeDeclaration() will look in > the kBase, and for guvnor compiled package this method returns null (don't > know why). I think you may have a difference between your Guvnor version > and the drools runtime version. > > > You can either use the source got from guvnor ( > http://localhost:8080/guvnor/rest/packages/org.dfms.model/source) to > build your kBase, and this should work fine. > > > > > > ___ > 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] Guvnor search for rules based on fact attributes
Hi folks, I have been asked by my current client to evaluate search functionality which could in essence search for rules which are affected by a particular fact value. For example, if we have a number of rules similar to the following format: when $req : TradeRequest(account = 10, buyCurrency = 'EUR', buyAmount > 500) then TradeValidationResponse response = new TradeValidationResponse(); response.setPermitted(false); response.setMessage("Account 10 is not permitted to trade more than 500 EUR"); insert(response); end What the client is interested in is being able to search for all rules which have been defined for account 10. I was thinking to mess around with a rather quick and dirty solution to grab the package source via the REST interface and pattern match rules in a very hard-coded way for this specific use-case. However, that does look like a rather fragile way of achieving this. So I was wondering whether anybody had looked at this sort of idea previously and might have thoughts on a 'better' or more generic solution, which wouldn't be massively complicated. I was thinking that it might be nice to extend the search mechanism in Guvnor so that I could pick a fact from the model and do a search for all rules which are based on the value of an attribute. However, every time I think about how that could be achieved, it seems I come up with new ways in which it would become really difficult to pull off. Any thoughts? Cheers, Steve ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Slow compilation (4h) for a single rule
Thanks for your explanation Edson, it makes sense now I think! Basically what you are saying is that there is a limit, beyond which is no longer feasible to use more ORs on a rule. Edson Tirelli-4 wrote > > You are trying to avoid the issue. As reported by others, your > conditions should be inside the patterns, not in "or'd" evals in the end, > and yes, it is possible to generate rules like that in an automated > program. > Sadly I don't see how, as some of my rules have arbitrary arithmetic involving more than one variable inside the Number(), for more context see the example I've put on http://drools.46999.n3.nabble.com/drools-arithmetics-without-eval-td3823232.html. For this case I think I will try to invert the logic and get rid of the ORs: not(A or B) => not(A) and not(B). Best regards, TL -- View this message in context: http://drools.46999.n3.nabble.com/Slow-compilation-4h-for-a-single-rule-tp4018855p4018894.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] How to make available declarative model to all packages.
I'm using Guvnor 5.4 -- View this message in context: http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018892.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