Re: [rules-users] OptaPlanner: score corruption when using insertLogical with custom objects
On 24-07-13 17:05, pvandenbrink wrote: Thanks for looking into it, and you're right. Looks like I made an error in the reproducer project, sorry... The original code didn't have this equals/hashcode problem. After fixing this in the reproducer, the example schedule works fine though, so I'll have to have another look to see if I can get it to reproduce again with another example dataset. Yes, please reopen the jira issue if you're able to reproduce it with 6.0.0.Beta5 or higher. -- View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-score-corruption-when-using-insertLogical-with-custom-objects-tp4024932p4025124.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] Drools Dzone Refcard
Great Mario! Can I publish that in my blog? On Thu, Jul 25, 2013 at 9:01 AM, Mario Fusco mario.fu...@gmail.com wrote: Hi all, Marcin Grzejszczak and myself wrote a Dzone Refcard covering Drools 5.5 that is now available for download here: http://refcardz.dzone.com/refcardz/drools We hope this could be useful both as a starting guide for beginners and as cheat sheet for more experienced users. Cheers, Mario -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Dzone-Refcard-tp4025135.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 -- - MyJourney @ http://salaboy.com http://salaboy.wordpress.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Dzone Refcard
I am not sure if you can republish it somewhere else but I don't think so. You could just link it from your blog if you want. I will ask to the Dzone guy I am in touch with if it can be published in a blog, but I am quite skeptical about it. Mario -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Dzone-Refcard-tp4025135p4025137.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] Drools Dzone Refcard
I will just post the link and a small brief about it Sent from my iPhone On 25 Jul 2013, at 11:11, Mario Fusco mario.fu...@gmail.com wrote: I am not sure if you can republish it somewhere else but I don't think so. You could just link it from your blog if you want. I will ask to the Dzone guy I am in touch with if it can be published in a blog, but I am quite skeptical about it. Mario -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Dzone-Refcard-tp4025135p4025137.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] OptaPlanner: score corruption when using insertLogical with custom objects
ge0ffrey wrote Yes, please reopen the jira issue if you're able to reproduce it with 6.0.0.Beta5 or higher. Done, I've modified the dataset, so the issue's reproducible again in 6.0.0.Beta5 and 6.0.0.SNAPSHOT, with the corrected equals/hashcode for FamilyStart. -- View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-score-corruption-when-using-insertLogical-with-custom-objects-tp4024932p4025139.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] Timer and AgendaFilter
Hi, I have a rule with a timer and call fireAllRules(AgendaFilter agendaFilter) with an AgendaFilter. I can see the Activation is fired after the delay but accept(Activation activation) in my AgendaFilter isn't invoked. My AgendaFilter is working well for other rules without timers. Is this a bug or wanted that ScheduledActivations aren't passed to the AgendaFilter? I'm using drools expert 5.5.0.Final. Thanks, Kai ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor 5.5 POJO upload error when there is dependency
Guvnor 5.5.0 on Tomcat 7 I have 2 model jars: x.jar y.jar Both contain our domain pojos. y.jar does not have any dependencies. x.jar has a reference to a class in y.jar When I upload y.jar, no errors When I upload x.jar after y.jar is already uploaded, I get this error for the class that is in y.jar Caused by: java.lang.NoClassDefFoundError: com/classFromY.jar at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630) at java.lang.ClassLoader.defineClass(ClassLoader.java:614) at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:85) at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:103) at java.lang.ClassLoader.loadClass(ClassLoader.java:246) at org.drools.guvnor.server.contenthandler.ModelContentHandler.isClassVisible(ModelContentHandler.java:184) at org.drools.guvnor.server.contenthandler.ModelContentHandler.getImportsFromJar(ModelContentHandler.java:149) at org.drools.guvnor.server.contenthandler.ModelContentHandler.onAttachmentRemoved(ModelContentHandler.java:87) at org.drools.guvnor.server.RepositoryAssetService.archiveOrUnarchiveAsset(RepositoryAssetService.java:489) Due to project/organization, I am not able to merge both jars. So question... Does the Guvnor pojo jar require that it cannot have any dependencies outside the jar? even if the other jar is also uploaded? thanks -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-5-POJO-upload-error-when-there-is-dependency-tp4025146.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] uninformative rule parsing/compiling error - org.drools.rule.Rule cannot be cast to org.drools.rule.Query
Op 24/07/2013 14:24, Davide Sottara schreef: Two clarifications first: 1) Which version are you using? Version 5.4.0.Final 2) Is TrackerUpdate a static class inside TrackerRemote? In case, could you post the exact import statements you are using? It is a normal class inside TrackerRemote. public class TrackerRemote extends vrpn.VRPNDevice implements java.lang.Runnable { public class TrackerUpdate {... I imported: import vrpn.TrackerRemote; and used it as follows: rule TrackerRemote.TrackerUpdate when message:TrackerRemote.TrackerUpdate() then System.out.println(Tracker: + message); end Extra information: I have been trying to add type declarations in one file and import them in another and I get exactly the same error message. There I did this: package derooms.be.testRule declare TestEvent @typesafe(false) number : int message : String end and then a rule: package derooms.be.testRule rule TestEvent when event:TestEvent(message == doesDynamicEventTypeWork?) then System.out.println(Got Event: + event.data); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to set drools.dialect.mvel.strict = false?
Thanks a lot, this helps alot. now all the errors gone. On Thu, Jul 25, 2013 at 1:24 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: @Mark: There's really no need to claim additional bugs ;-) @Jeetendra: Within a pattern (such as ProposalLight(...)) you may write bindings and constraints, which are boolean expressions. Older versions had a much more restricted syntax for constraints, and general (Java-style) expressions were only peremitted by enclosing them in eval(...). In 5.5.0, as soon as you open a parenthesis, you have to stick to plain old Java (or MVEL) syntax, and eval is a name like any other. Recognizing eval(...) as the legacy marker for introducing an expression has to be kept, but only at the outermost parenthesis nesting level of constraint expressions. See example #1 below: ### 1 ### function boolean positive(int a){ return a 0; } // legacy style constraint, use eval() to wrap boolean expression $msg: Message( eval(positive($msg.getText().length())) ) // modern style: boolean expression $msg: Message( positive($msg.getText().length()) ) // modern style: boolean expression with redundant parentheses $msg: Message( ( positive($msg.getText().length()) ) ) The next example demostrates that eval is a soft keyword, with recognition restricted to certain places: ### 2 ### function boolean eval(int a){ return a 0; } // Why not call a function eval? // modern style: boolean expression, parentheses required to bypass soft eval recognition $msg: Message( ( eval($msg.getText().length()) ) ) So, the answer to your question How can I make it work? is quite simple: add a declaration of a boolean function eval, like this: function boolean eval( boolean b ){ return b; } And, please, do not use terms like throws an exception when a simple syntax error is reported. -W On 25/07/2013, Mark Proctor mproc...@codehaus.org wrote: It shouldn't do, and could be a bug. Can you try 5.6.0.SNAPSOT and see if it is still a problem. Mark On 24 Jul 2013, at 18:22, Jeet Singh jeet...@gmail.com wrote: Alright, I kinda found out the cause of the exception I am getting, however I am still struggling the reason behind the exception. So DRL_1, this works perfectly fine. package drools; import drools.ProposalLight; import function drools.DateUtil.compareDatesWithTime; rule Date Rule when $obj : ProposalLight(eval(compareDatesWithTime(endDateTime, -2, 6, \\))) then $obj.addFailedRule(Date Rule); end; DRL_2, this doesn't work. and throws [Error: unable to resolve method using strict-mode: myObject.eval(boolean)] [Near : {... (eval(compareDatesWithTime(star }] ... package drools; import drools.ProposalLight; import function drools.DateUtil.compareDatesWithTime; rule Date Rule when $obj : ProposalLight((eval(compareDatesWithTime(endDateTime, -2, 6, \\ then $obj.addFailedRule(Date Rule); end; Notice that extra paranthesis around eval(). This is where Drools 5.5 throws exception. Can someone please explain why this extra paranthesis throws exception and how can I make it work. Thanks, Jeetendra. On Wed, Jun 5, 2013 at 1:27 AM, Wolfgang Laun wolfgang.l...@gmail.com wrote: The error message suggests that you have made a syntactic error in a rule which is not the one you have posted, or you have modified the rule too much to be of any help. Post again, taking great care not to omit anything or to change the cause of the problem. Also, indicate precisely the declaration of the function compareDatesWithTime(). -W On 04/06/2013, jeetendray jeet...@gmail.com wrote: Hi, Snippet of my DRL . rule Rev: Start Time 2 Hours in Future when $obj : eval(compareDatesWithTime(startDateTime, -2, 2, )) then $obj.addFailedRule(Rev: Start Time 2 Hours in Future); end This fails during compilation and throws error: org.drools.rule.InvalidRulePackage: Unable to Analyse Expression (eval(compareDatesWithTime(startDateTime, -2, 2, )) ): [Error: unable to resolve method using strict-mode: myObject.eval(boolean)] [Near : {... (eval(compareDatesWithTime(star }] ^ [Line: 6, Column: 2] : [Rule name='Proposal - Start time is after current + 2 hour'] I am using Drools 5.5 and I found the cause that my code runs in strict mode.. so If I set strict mode to false then this would work. Now I am not sure how to make it to false. Here's the code I am using: PackageBuilderConfiguration packageBuilderConfiguration = new PackageBuilderConfiguration(); PackageBuilder packageBuilder = new PackageBuilder(packageBuilderConfiguration); packageBuilder.addPackageFromDrl(drl.getCharacterStream()); Can someone please suggest me how to do that?? Thanks!!! -- View this message
[rules-users] Tracking documentation changes
As we approach final release, many of us will be working on documentation. I would like to ask anyone committing changes to docs to use the BZ-916448 on your commit message to make it easier to track these commits. Thank you -- Edson Tirelli Principal Software Engineer Red Hat Business Systems and Intelligence Group ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users