Re: [rules-users] DROOLS Negate Question
Brother you are working on saturday? Regards, Faisal Shafique On May 21, 2011, at 2:55 PM, mahmood lebbai wrote: > I need help to clarify the following > > I had taken latest Guvnour 5.2.0 M2 version and use the sample pricing loan > rules. > > When i tried to use the "Negate" Meta data option and set it to true on first > rule , i had got the following error. > > > Pricing loans] [ERR 102] Line 7:3 mismatched input 'income' in rule "Row 1 > Pricing loans" > [Pricing loans] Line 16:0 unexpected exception at input 'rule'. > Exception: java.util.EmptyStackException. Stack trace: > java.util.EmptyStackException at java.util.Stack.peek(Stack.java:79) at > java.util.Stack.pop(Stack.java:61) at > org.drools.lang.ParserHelper.popParaphrases(ParserHelper.java:409) at > org.drools.lang.ParserHelper.end(ParserHelper.java:723) at > org.drools.lang.DRLParser.rule(DRLParser.java:915) at > org.drools.lang.DRLParser.statement(DRLParser.java:248) at > org.drools.lang.DRLParser.compilationUnit(DRLParser.java:143) at > org.drools.compiler.DrlParser.compile(DrlParser.java:225) at > org.drools.compiler.DrlParser.parse(DrlParser.java:71) at > org.drools.compiler.DrlParser.parse(DrlParser.java:76) at > > I have a similar requirement where in I need to write both negate with true > and false within the same ruleset in guvnour. Please help me out how to > achieve this. > > Regards, > Mahmood > ___ > 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] Is it a valid use of \n in DSL
Hi, I want to know if following is a valid use of '\n' i.e new line character in a DSL to put different patterns on different lines in resulting DRL? [when]There is an instance of RulesContext=$rc:RulesContext()\n$ce:CaseEligibility()\n$cp:CertificationPeriod(startDate <= $rc.calculationDate, endDate >= $rc.calculationDate, caseId == $rc.caseId) which results in following DRL when $rc:RulesContext() $ce:CaseEligibility() $cp:CertificationPeriod(startDate <= $rc.calculationDate, endDate >= $rc.calculationDate, caseId == $rc.caseId) DSL parser expands this correctly but the question is whether this is a supported behavior or just works because of the way parsing works and hence may change in future? Thanks, Faisal Shafique ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Custom dates with @date-effective and @date-expires
Thanks for the answer. Yes, it may be easier to achieve with simple date fact but we have thousands of rules and each and every one of them has this temporal requirement. I was thinking along the lines of SessionClock. I know there is a 'realtime' and 'pseudoclock' implementation of it. May be I can write my own implementation of SessionClock and set any arbitrary date passed by the user into the knowledge session config. Then the rules attributes (@date-effective and @date-expires) can take care of filtering out the ones not effective on the date that I am setting in SessionClock. Am I thinking in the wrong direction? Regards, Faisal Shafique On Mar 17, 2011, at 12:34 AM, Wolfgang Laun wrote: > The desired effect might be easier to achieve with a fact EffectiveDate { > Date date; } and a pattern specifying the limits. > > The rule attributes (not metadata) are based on the system data, and you > wouldn't want to mess with it just to use data-effective and date-expires. > > -W > > On 17 March 2011 00:33, Faisal Shafique wrote: > Hi, > > Can I use any arbitrary date for the drools execution so that correct rules > are fired based on not current date but any arbitrary date? This is in the > context of @date-effective and @date-expires metadata that can be specified > as part of a rule. Drools expert documentation seems to imply that this > metadata uses "current date" though I am not clear what current date (system > date?) means. > > Thanks > > Faisal Shafique > > > > ___ > 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] Custom dates with @date-effective and @date-expires
Hi, Can I use any arbitrary date for the drools execution so that correct rules are fired based on not current date but any arbitrary date? This is in the context of @date-effective and @date-expires metadata that can be specified as part of a rule. Drools expert documentation seems to imply that this metadata uses "current date" though I am not clear what current date (system date?) means. Thanks Faisal Shafique ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Can not download Drools binaries
That happened to me recently too. Using Internet Explorer browser instead of Chrome fixed it. Try downloading through a different browser. Regards, Faisal Shafique On Mar 7, 2011, at 6:55 AM, "Billy Buzzard" wrote: > I’m new to drools and I would like to download the binaries and try some of > the examples. However, when I click on the download like of the Drools > binaries the screen goes dim and nothing happens. Would someone please > explain to me what is going on and what I should do to get the binaries. > > ___ > 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] How to get correct version of rules based on effective date
Thats a good question I should have been more clear. Better example would be something like Federal Tax. Lets say there was a tax deduction allowed for buying a hybrid car in 2008. In 2009, due to changes in tax policy, this deduction is not allowed anymore. In 2010, policy again changed to allow this deduction but only for half the cost of the car. Now lets say that a person is filing for tax year 2008, 2009 and 2010 together. Effective date for running the tax rules would be 2008, 2009 and 2010 in this case. User will enter these dates on screen one by one, running the rules each time and calculate their taxes. System should be able to use correct rules which were effective at the time as per the effective date that user enters. To answer your question, rules themselves change and not just parameters. We already have a db based infrastructure for pulling out correct parameters (e.g tax bracket limits) based on effective date. As its a huge eligibility system, rules changes because of policy are common and this is a very common use case for government eligibility systems. We need a way to implement this which is performant, scalable (e.g should not slow down over time because of different rules versions) and easily maintanable. Somebody mentioned about pulling correct version from repository. That IMHO is more like version control system and very coarse grained. We need to be able to version rule by rule or may be resource like drl files. Thanks for your help. On Feb 21, 2011, at 2:13 AM, "Swindells, Thomas" wrote: > Do your rules actually change over time or just the paramaters in your rules > change? > > If the later then you could structure your rules so they don’t have values > hard coded but instead depend upon an Object (InterestRate) to provide them > and you code just loads the appropriate InterestRate object when the query > starts. > > > > Thomas > > > > From: rules-users-boun...@lists.jboss.org > [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun > Sent: 21 February 2011 09:08 > To: Rules Users List > Subject: Re: [rules-users] How to get correct version of rules based on > effective date > > > > There may be one rule to determine the interest rates depending on date and > whatever, and then there should be rules to do the calculation for some type > of deposit (savings, loand,...) with the previously established rate. > > Do not replicate calculation rules for various date intervals. > > -W > > > On 21 February 2011 05:36, Faisal Shafique wrote: > > Hi, > > We are evaluating Drools to replace a big legacy eligibility system in > government sector. One of the critical requirement is to have the system pull > correct rule based on a date e.g interest rate was 5% till 12/31/2010 but > changed to 6% from 1/1/2011. If we are running rules in 2010 or before, > calculation should use 5% else it should use 6%. Rules will run with a user > clicking a button and results will be shown to user so probably a > StatelessSession will be used. Something like AgendaFilters to filter rules > based on a date probably will not be very scalable since over time we'll have > lot of different temporal version of rules and all of them will have to be in > KnowledgeBase for AgendaFilter to work which will be memory intensive and > un-needed.IMHO, we should build KnowledgeBase with correct version of rules > in the first place. Any ideas or pointers? > > Thanks > > > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > ** > This message is confidential and intended only for the addressee. If you have > received this message in error, please immediately notify the > postmas...@nds.com and delete it from your system as well as any copies. The > content of e-mails as well as traffic data may be monitored by NDS for > employment and security purposes. To protect the environment please do not > print this e-mail unless necessary. > > NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 > 4EX, United Kingdom. A company registered in England and Wales. Registered > no. 3080780. VAT no. GB 603 8808 40-00 > ** > ___ > 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] How to get correct version of rules based on effective date
Hi, We are evaluating Drools to replace a big legacy eligibility system in government sector. One of the critical requirement is to have the system pull correct rule based on a date e.g interest rate was 5% till 12/31/2010 but changed to 6% from 1/1/2011. If we are running rules in 2010 or before, calculation should use 5% else it should use 6%. Rules will run with a user clicking a button and results will be shown to user so probably a StatelessSession will be used. Something like AgendaFilters to filter rules based on a date probably will not be very scalable since over time we'll have lot of different temporal version of rules and all of them will have to be in KnowledgeBase for AgendaFilter to work which will be memory intensive and un-needed.IMHO, we should build KnowledgeBase with correct version of rules in the first place. Any ideas or pointers? Thanks ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users