Hi,<br><br>NIce to receive your reply.<br>I am running on jboss-4.0.4.GA.<br><br>Jagaran <br><b><i>rules-users-request@lists.jboss.org</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Send rules-users mailing list submissions to<br> rules-users@lists.jboss.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br> https://lists.jboss.org/mailman/listinfo/rules-users<br>or, via email, send a message with subject or body 'help' to<br> rules-users-request@lists.jboss.org<br><br>You can reach the person managing the list at<br> rules-users-owner@lists.jboss.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of rules-users digest..."<br><br><br>Today's Topics:<br><br> 1. Re: Re: JBRMS Query, very imp for me (Fernando Meyer)<br> 2. Re: DSL to DRL File Conversion - Is it possible ? (kingston)<br> 3. About Decision table (kranthikumar
dalai)<br> 4. Two Doubts (Joj)<br> 5. Re: "Or" and Collect (Dirk Bergstrom)<br> 6. Example for using globals in Drools3.0.6 (Joj)<br> 7. Re: Example for using globals in Drools3.0.6 (JLL)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 30 May 2007 01:23:58 -0300<br>From: Fernando Meyer <fmcamargo@gmail.com><br>Subject: Re: [rules-users] Re: JBRMS Query, very imp for me<br>To: Rules Users List <rules-users@lists.jboss.org><br>Message-ID: <535CD4A5-B9BE-441D-AD95-C7CD8279AC19@gmail.com><br>Content-Type: text/plain; charset="us-ascii"<br><br>Howdy jagaran,<br><br> Can you please give me some informations about your application <br>environment?<br>are you running on jboss AS, tomcat or jetty ?<br><br>regards Fernando<br><br>Fernando Meyer<br>fmcamargo@gmail.com<br>GPG: 5A6D 3374 B055 A513 9A02 A03B 3DB3 7485 D804 DDFB<br><br><br>On May 30, 2007, at 12:54 AM, jagaran das wrote:<br><br>> Hi
Mark,<br>> You are right I would try to use Hibernate to store data in MySql.<br>> But I have a different problem.<br>> For creating rule package through JBRMS I have done following stuffs:<br>><br>> The project is really great.<br>> but i am unable to download the binary package.<br>> The steps followed by me is as below:<br>> 1. created a category.<br>> 2. created a package associated with that category.<br>> 3.Loaded a fact model which is a bean class and linked it with the <br>> package.<br>> 4. created some business rules.<br>> 5.imported the bean class in the configure package option and saved <br>> the changes.<br>> 6. created a new snapshot.<br>> 7. Build the package and it shown a success message too.<br>> 8. Now tried to download the package but it is giving package not <br>> found.<br>> Please let me know the solution.<br>> The message below is shown after i have created all the necessary <br>>
stuffs.<br>><br>> Building a package will collect all the assets, validate and <br>> compile into a deployable package.<br>><br>> and the message that<br>> Package built successfully.<br>> But cant down load the package as it is giving the following menage.<br>><br>> Status report<br>> message /drools-jbrms/org.drools.brms.JBRMS/package/com.sample/LATEST<br>> description The requested resource (/drools-jbrms/ <br>> org.drools.brms.JBRMS/package/com.sample/LATEST) is not available.<br>> Please let me know of the solutions.<br>><br>> Mark Proctor <mproctor@codehaus.org> wrote:<br>> you lost me, sounds like you don't want to use jackrabbit <br>> persistence, but have your own way to store normalised rules in <br>> your own database schema - we don't have anything for that at the <br>> moment, you'd have to create this yourself.<br>><br>> Mark<br>> jagaran das wrote:<br>>> Hey
Mark,<br>>><br>>> Nice to receive your post.<br>>> If we want to store data directly in the database we need some <br>>> specific rule table and ruleset table and other tables and a <br>>> persistence service like Hibernate.<br>>> But we need to pick the values from the gui and arrange it <br>>> accordingly.<br>>><br>>> Regards<br>>> JAGARAN<br>>><br>>> Download prohibited? No problem! CHAT from any browser, without <br>>> download.<br>><br>><br>><br>> Did you know? You can CHAT without downloading messenger. Know how!<br>> _______________________________________________<br>> rules-users mailing list<br>> rules-users@lists.jboss.org<br>> https://lists.jboss.org/mailman/listinfo/rules-users<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL:
http://lists.jboss.org/pipermail/rules-users/attachments/20070530/c72636e9/attachment-0001.html<br><br>------------------------------<br><br>Message: 2<br>Date: Tue, 29 May 2007 22:14:14 -0700 (PDT)<br>From: kingston <raja_kingston@yahoo.co.in><br>Subject: Re: [rules-users] DSL to DRL File Conversion - Is it possible<br> ?<br>To: rules-users@lists.jboss.org<br>Message-ID: <10867626.post@talk.nabble.com><br>Content-Type: text/plain; charset=us-ascii<br><br><br>Hi Mark ,<br><br>Can you just help me in converting this drl to dsl. ? How do i break lines<br>in DSL involving OR conditions.?<br>"[when]-" works for AND conditions . Do i really need give some english text<br>(DSL mapping) for each line of the when condition when i use "[when]-"<br><br><br>//Sample drl file.<br><br>package com.fruit;<br>import com.test.sample.*;<br><br><br>rule "FruitExample"<br> <br> when<br> C: Customer();<br> Fruit ( name == "apple" , costinrupees == 10) ; &&<br> eval (
C.getNumOfCustomers() == 20 && ( C.getCityname() == "kanput" ||<br>C.getCityname() == "Disput" )) <br> then <br> System.out.println("Rule Success");<br> <br>end<br><br><br>The above conditions could be wrriten on a single line using eval() . But<br>this looks pretty long. Are there any other options i coudl try for breaking<br>line.? Do we have any workarounds for this.?<br><br><br><br>Mark Proctor wrote:<br>> <br>> Its not straight forward but you can use the DRLDumper, one a <br>> PackageDescr, assuming it parses without errors:<br>> DrlParser parser = new DrlParser();<br>> PackageDescr pkg = parser.parse( source,<br>> dsl );<br>> final DrlDumper drlDumper = new DrlDumper();<br>> final String drlResult = drlDumper.dump( pkg );<br>> <br>> <br>> <br>> Michael Neale wrote:<br>>> no in 3.0 version unfortunately. You can tell the
parser to print out <br>>> the DRL - but it will just write it out the System.out (only for <br>>> debuggin). Look in RuleParser for that option.<br>>><br>>> In trunk - which will be the new version - there is a seperate step <br>>> which outputs DRL - but I don't think that made it into the M1 release <br>>> - should be in M2 though.<br>>><br>>> On 3/7/07, *kingston* <raja_kingston@yahoo.co.in><br>>> <mailto:raja_kingston@yahoo.co.in>> wrote:<br>>><br>>><br>>> Is there anyway to get the DRL syntax out of the DSL format?<br>>><br>>> Is there any Convenient API method Which takes rule in DSL format<br>>> and the<br>>> DSL File Name as arguments and returns the DRL Syntax ?<br>>><br>>> --<br>>> View this message in context:<br>>> <br>>>
http://www.nabble.com/DSL-to-DRL-File-Conversion---Is-it-possible---tf3360408.html#a9347582<br>>> Sent from the drools - user mailing list archive at Nabble.com<br>>> <http: nabble.com="">.<br>>><br>>> _______________________________________________<br>>> rules-users mailing list<br>>> rules-users@lists.jboss.org <mailto:rules-users@lists.jboss.org><br>>> https://lists.jboss.org/mailman/listinfo/rules-users<br>>><br>>><br>>> ------------------------------------------------------------------------<br>>><br>>> _______________________________________________<br>>> rules-users mailing list<br>>> rules-users@lists.jboss.org<br>>> https://lists.jboss.org/mailman/listinfo/rules-users<br>>> <br>> <br>> <br>> _______________________________________________<br>> rules-users mailing list<br>> rules-users@lists.jboss.org<br>>
https://lists.jboss.org/mailman/listinfo/rules-users<br>> <br>> <br><br><br>:-/<br>-- <br>View this message in context: http://www.nabble.com/DSL-to-DRL-File-Conversion---Is-it-possible---tf3360408.html#a10867626<br>Sent from the drools - user mailing list archive at Nabble.com.<br><br><br><br>------------------------------<br><br>Message: 3<br>Date: Wed, 30 May 2007 10:44:23 +0530<br>From: "kranthikumar dalai" <nvkranthikumardalai@gmail.com><br>Subject: [rules-users] About Decision table<br>To: rules-users@lists.jboss.org<br>Message-ID:<br> <df24e5cd0705292214r6e921872l61ffc47e88d2f83@mail.gmail.com><br>Content-Type: text/plain; charset="iso-8859-1"<br><br> Hi to all,<br><br> we wrote some rules as follows<br><br><br>package com.leave<br><br>import com.leave.paternity;<br><br><br><br>rule "Paternity Approved"<br><br>salience 1000<br><br>when<br><br>paternity : paternity(gender == 'male',status =='married',role<br>=='permanent',tenure <= 2,year == 1,applied
==2);<br><br>then<br><br>paternity.eligible = 2;<br><br>paternity.available = 2;<br><br>System.out.println("leave approved for :" + paternity.getname());<br><br>System.out.println("Total eligible leaves are :" + paternity.getEligible());<br><br>end<br><br>rule "Paternity Approved1"<br><br>salience 800<br><br>when<br><br>paternity : paternity(gender == 'male',status =='married', role<br>=='permanent(Onsite)',tenure <= 2 , year ==1, applied ==2,withinmonth <=<br>30); //withinmonth means if applied with in a month after returning from<br>Onsite<br><br>then<br><br>paternity.eligible = 2;<br><br>paternity.available = 2;<br><br>System.out.println("leave approved for :" + paternity.getname());<br><br>System.out.println("Total eligible leaves for employee Onsite are :" +<br>paternity.getEligible());<br><br>end<br><br><br><br>And they are working fine in jboss 4.0<br><br><br><br>But we need help that in (from the above how can we write decision table for<br>user (non
developer that he wants to change the rulse)<br><br>Pls give us some useful suggestions<br><br>Regards:<br><br>Kranthi Dalai<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070530/09fbd625/attachment-0001.html<br><br>------------------------------<br><br>Message: 4<br>Date: Tue, 29 May 2007 22:16:58 -0700 (PDT)<br>From: Joj <jojpm@yahoo.com><br>Subject: [rules-users] Two Doubts<br>To: rules-users@lists.jboss.org<br>Message-ID: <10867640.post@talk.nabble.com><br>Content-Type: text/plain; charset=us-ascii<br><br><br>Hi,<br><br>I have two doubts :<br><br>1) Can't we use mathematical operations like average, sum, max, min, etc on<br>the LHS of rule? If, how can I use it? Please show me an example.<br><br>2) Can't we manipulate - add and lookup - on a List object on LHS and RHS?<br>If possible, how can I do it?<br>Please describe using a sample.<br><br><br>Thanks in
advance<br>Jojan<br><br><br>-- <br>View this message in context: http://www.nabble.com/Two-Doubts-tf3838282.html#a10867640<br>Sent from the drools - user mailing list archive at Nabble.com.<br><br><br><br>------------------------------<br><br>Message: 5<br>Date: Tue, 29 May 2007 22:33:13 -0700<br>From: Dirk Bergstrom <dirk@juniper.net><br>Subject: Re: [rules-users] "Or" and Collect<br>To: Rules Users List <rules-users@lists.jboss.org><br>Message-ID: <465D0C99.8080605@juniper.net><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>Edson Tirelli was heard to exclaim, On 05/29/07 17:13:<br>> $badBugs : List() from<br>> collect( Bug( (devOwner memberOf $group || supportOwner memberOf $group),<br>> severity == "hair-on-fire" )<br>> And use || and && for connecting constraints<br>> and "and" and "or" for connecting CE's.<br><br>Ahh, ok. From the examples I'd seen, it was hard to tell, and the docs still<br>show the two as equivalent for
connecting CEs (section 3.15).<br><br>This will allow me to replace an ugly predicate hack with a clunky but workable<br>parenthetical grouping. Of course, if you'd care to implement yet another handy<br>Collections-based constraint, I could make it really clean:<br><br>We've got "contains", and now "memberOf" (thanks for implementing my<br>suggestion), so how about "intersects"?<br><br> CheeseCounter( stinkyCheeses intersects crumblyCheeses )<br><br>Then I could write my rule like so:<br><br>collect( Bug( (owners intersects $group), ...<br><br>This would save me from having to edit ten or twenty rules when management<br>inevitably decides that another kind of owner has to be included in the rules --<br>there are actually five "owners" now (which makes for a very ugly parenthetical).<br><br>Can I file a jira for "intersects", or should I quit being greedy, and enjoy the<br>shiny new "memberOf" that I am in fact very happy about? :)<br><br>-- <br>Dirk Bergstrom
dirk@juniper.net<br>_____________________________________________<br>Juniper Networks Inc., Computer Geek<br>Tel: 408.745.3182 Fax: 408.745.8905<br><br><br>------------------------------<br><br>Message: 6<br>Date: Tue, 29 May 2007 23:15:01 -0700 (PDT)<br>From: Joj <jojpm@yahoo.com><br>Subject: [rules-users] Example for using globals in Drools3.0.6<br>To: rules-users@lists.jboss.org<br>Message-ID: <10868057.post@talk.nabble.com><br>Content-Type: text/plain; charset=us-ascii<br><br><br>Hi,<br><br>In the document, its written that "They are typically used to return data"<br>under globals section. How can I return a global value to the calling<br>method? In other words, how can I receive it in Java code? Can anybody<br>explain with a simple example?<br><br>And please identify the changes required if I need to get the value of<br>global in the example below:<br><br>........<br><br>global String status<br><br>rule "FindStatus"<br> when<br>
student: Student ( mark >= 50 )<br> then<br> status = "passed";<br>end<br><br><br>In this case, there's no need of a global variable, I know. But, anyway, how<br>can I get its value on the calling method?<br><br><br>Thanks in advance,<br>Jojan<br><br><br>-- <br>View this message in context: http://www.nabble.com/Example-for-using-globals-in-Drools3.0.6-tf3838437.html#a10868057<br>Sent from the drools - user mailing list archive at Nabble.com.<br><br><br><br>------------------------------<br><br>Message: 7<br>Date: Wed, 30 May 2007 00:50:18 -0700 (PDT)<br>From: JLL <jll@labocollard.be><br>Subject: Re: [rules-users] Example for using globals in Drools3.0.6<br>To: rules-users@lists.jboss.org<br>Message-ID: <10869121.post@talk.nabble.com><br>Content-Type: text/plain; charset=us-ascii<br><br><br>hi<br><br>i thing using a string could cause some problems<br>better use your own object named like "Mock" containing a string with setter<br>and getter<br><br>in the
java code assert the object in working memory with<br>MemoryManager.getWorkingMemory().setGlobal("mock", mock);<br><br>in the rule file<br> don't forget to import your Mock<br>and <br> global Mock mock<br><br> in the when <br> $mock : Mock( )<br> and other conditions<br><br> in the then statement <br> $mock.setMyString("hello world");<br><br>after the rule fire the value must have been changed ...<br><br>hope it's clear enough<br>friendly<br><br>JLL<br><br><br>Joj wrote:<br>> <br>> Hi,<br>> <br>> In the document, its written that "They are typically used to return data"<br>> under globals section. How can I return a global value to the calling<br>> method? In other words, how can I receive it in Java code? Can anybody<br>> explain with a simple example?<br>> <br>> And please identify the changes required if I need to get the value of<br>> global in the example below:<br>> <br>> ........<br>> <br>> global String
status<br>> <br>> rule "FindStatus"<br>> when<br>> student: Student ( mark >= 50 )<br>> then<br>> status = "passed";<br>> end<br>> <br>> <br>> In this case, there's no need of a global variable, I know. But, anyway,<br>> how can I get its value on the calling method?<br>> <br>> <br>> Thanks in advance,<br>> Jojan<br>> <br>> <br>> <br><br>-- <br>View this message in context: http://www.nabble.com/Example-for-using-globals-in-Drools3.0.6-tf3838437.html#a10869121<br>Sent from the drools - user mailing list archive at Nabble.com.<br><br><br><br>------------------------------<br><br>_______________________________________________<br>rules-users mailing list<br>rules-users@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/rules-users<br><br><br>End of rules-users Digest, Vol 6, Issue
73<br>******************************************<br></jll@labocollard.be></jojpm@yahoo.com></rules-users@lists.jboss.org></dirk@juniper.net></jojpm@yahoo.com></df24e5cd0705292214r6e921872l61ffc47e88d2f83@mail.gmail.com></nvkranthikumardalai@gmail.com></mailto:rules-users@lists.jboss.org></http:></mailto:raja_kingston@yahoo.co.in></raja_kingston@yahoo.co.in></raja_kingston@yahoo.co.in></mproctor@codehaus.org></rules-users@lists.jboss.org></fmcamargo@gmail.com></blockquote><br><p> 
<hr size=1></hr> Download prohibited? No problem! <a href="http://us.rd.yahoo.com/mail/in/ywebmessenger/*http://in.messenger.yahoo.com/webmessengerpromo.php">CHAT</a> from any browser, without download.