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: &lt;535CD4A5-B9BE-441D-AD95-C7CD8279AC19@gmail.com&gt;<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>&gt; Hi
 Mark,<br>&gt; You are right I would try to use Hibernate to store data in MySql.<br>&gt; But I have a different  problem.<br>&gt; For creating rule package through JBRMS I have done following stuffs:<br>&gt;<br>&gt; The project is really great.<br>&gt; but i am unable to download the binary package.<br>&gt; The steps followed by me is as below:<br>&gt; 1. created a category.<br>&gt; 2. created a package associated with that category.<br>&gt; 3.Loaded a fact model which is a bean class and linked it with the  <br>&gt; package.<br>&gt; 4. created some business rules.<br>&gt; 5.imported the bean class in the configure package option and saved  <br>&gt; the changes.<br>&gt; 6. created a new snapshot.<br>&gt; 7. Build the package and it shown a success message too.<br>&gt; 8. Now tried to download the package but it is giving package not  <br>&gt; found.<br>&gt; Please let me know the solution.<br>&gt; The message below is shown after i have created all the necessary  <br>&gt;
 stuffs.<br>&gt;<br>&gt; Building a package will collect all the assets, validate and  <br>&gt; compile into a deployable package.<br>&gt;<br>&gt; and the message that<br>&gt; Package built successfully.<br>&gt; But cant down load the package as it is giving the following menage.<br>&gt;<br>&gt; Status report<br>&gt; message /drools-jbrms/org.drools.brms.JBRMS/package/com.sample/LATEST<br>&gt; description The requested resource (/drools-jbrms/ <br>&gt; org.drools.brms.JBRMS/package/com.sample/LATEST) is not available.<br>&gt; Please let me know of the solutions.<br>&gt;<br>&gt; Mark Proctor <mproctor@codehaus.org> wrote:<br>&gt; you lost me, sounds like you don't want to use jackrabbit  <br>&gt; persistence, but have your own way to store normalised rules in  <br>&gt; your own database schema - we don't have anything for that at the  <br>&gt; moment, you'd have to create this yourself.<br>&gt;<br>&gt; Mark<br>&gt; jagaran das wrote:<br>&gt;&gt; Hey
 Mark,<br>&gt;&gt;<br>&gt;&gt; Nice to receive your post.<br>&gt;&gt; If we want to store data directly in the database we need some  <br>&gt;&gt; specific rule table and ruleset table and other tables and a  <br>&gt;&gt; persistence service like Hibernate.<br>&gt;&gt; But we need to pick the values from the gui and arrange it  <br>&gt;&gt; accordingly.<br>&gt;&gt;<br>&gt;&gt; Regards<br>&gt;&gt; JAGARAN<br>&gt;&gt;<br>&gt;&gt; Download prohibited? No problem! CHAT from any browser, without  <br>&gt;&gt; download.<br>&gt;<br>&gt;<br>&gt;<br>&gt; Did you know? You can CHAT without downloading messenger. Know how!<br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; rules-users@lists.jboss.org<br>&gt; 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: &lt;10867626.post@talk.nabble.com&gt;<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) ; &amp;&amp;<br>  eval (
 C.getNumOfCustomers() == 20 &amp;&amp; (  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>&gt; <br>&gt; Its not straight forward but you can use the DRLDumper, one a <br>&gt; PackageDescr, assuming it parses without errors:<br>&gt;         DrlParser parser = new DrlParser();<br>&gt;         PackageDescr pkg = parser.parse( source,<br>&gt;                                                               dsl );<br>&gt;         final DrlDumper drlDumper = new DrlDumper();<br>&gt;         final String drlResult = drlDumper.dump( pkg );<br>&gt; <br>&gt; <br>&gt; <br>&gt; Michael Neale wrote:<br>&gt;&gt; no in 3.0 version unfortunately. You can tell the
 parser to print out <br>&gt;&gt; the DRL - but it will just write it out the System.out (only for <br>&gt;&gt; debuggin). Look in RuleParser for that option.<br>&gt;&gt;<br>&gt;&gt; In trunk - which will be the new version - there is a seperate step <br>&gt;&gt; which outputs DRL - but I don't think that made it into the M1 release <br>&gt;&gt; - should be in M2 though.<br>&gt;&gt;<br>&gt;&gt; On 3/7/07, *kingston* <raja_kingston@yahoo.co.in><br>&gt;&gt; <mailto:raja_kingston@yahoo.co.in>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;     Is there anyway to get the DRL syntax out of the DSL format?<br>&gt;&gt;<br>&gt;&gt;     Is there any Convenient API method Which takes rule in DSL format<br>&gt;&gt;     and the<br>&gt;&gt;     DSL File Name as arguments and returns the DRL Syntax ?<br>&gt;&gt;<br>&gt;&gt;     --<br>&gt;&gt;     View this message in context:<br>&gt;&gt;    <br>&gt;&gt;
 http://www.nabble.com/DSL-to-DRL-File-Conversion---Is-it-possible---tf3360408.html#a9347582<br>&gt;&gt;     Sent from the drools - user mailing list archive at Nabble.com<br>&gt;&gt;     <http: nabble.com="">.<br>&gt;&gt;<br>&gt;&gt;     _______________________________________________<br>&gt;&gt;     rules-users mailing list<br>&gt;&gt;     rules-users@lists.jboss.org <mailto:rules-users@lists.jboss.org><br>&gt;&gt;     https://lists.jboss.org/mailman/listinfo/rules-users<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; ------------------------------------------------------------------------<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; rules-users mailing list<br>&gt;&gt; rules-users@lists.jboss.org<br>&gt;&gt; https://lists.jboss.org/mailman/listinfo/rules-users<br>&gt;&gt;   <br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; rules-users@lists.jboss.org<br>&gt;
 https://lists.jboss.org/mailman/listinfo/rules-users<br>&gt; <br>&gt; <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 &lt;= 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 &lt;= 2 , year ==1, applied ==2,withinmonth &lt;=<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: &lt;10867640.post@talk.nabble.com&gt;<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: &lt;465D0C99.8080605@juniper.net&gt;<br>Content-Type: text/plain; charset=ISO-8859-1<br><br>Edson Tirelli was heard to exclaim, On 05/29/07 17:13:<br>&gt; $badBugs : List() from<br>&gt; collect( Bug( (devOwner memberOf $group || supportOwner memberOf $group),<br>&gt;          severity == "hair-on-fire" )<br>&gt; And use || and &amp;&amp; for connecting constraints<br>&gt; 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: &lt;10868057.post@talk.nabble.com&gt;<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 &gt;= 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: &lt;10869121.post@talk.nabble.com&gt;<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>&gt; <br>&gt; Hi,<br>&gt; <br>&gt; In the document, its written that "They are typically used to return data"<br>&gt; under globals section. How can I return a global value to the calling<br>&gt; method? In other words, how can I receive it in Java code? Can anybody<br>&gt; explain with a simple example?<br>&gt; <br>&gt; And please identify the changes required if I need to get the value of<br>&gt; global in the example below:<br>&gt; <br>&gt; ........<br>&gt; <br>&gt; global String
 status<br>&gt; <br>&gt; rule "FindStatus"<br>&gt;     when<br>&gt;         student: Student ( mark &gt;= 50 )<br>&gt;     then<br>&gt;         status = "passed";<br>&gt; end<br>&gt; <br>&gt; <br>&gt; In this case, there's no need of a global variable, I know. But, anyway,<br>&gt; how can I get its value on the calling method?<br>&gt; <br>&gt; <br>&gt; Thanks in advance,<br>&gt; Jojan<br>&gt; <br>&gt; <br>&gt; <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>&#32;



      <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.