<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    I have made progresses on that, and think I have found some bugs.<br>
    <br>
    First, I was using category rules having bindings in their
    conditions. A JIRA mentionned that, and correction is made for 5.1
    version. Thus, with my 5.0.1, it could not work.... <br>
    After removing bindings in my category rules, it was still not
    working ...<br>
    <br>
    Then, I tried to use root categories instead of my original one
    which was under a parent root category. <br>
    With that modification, now my rules has the magic word "extends"
    with my category rule. So the DRL seems to be generated well, but
    only with root categories ... <br>
    In the class org.drools.guvnor.server.contenthandler.ContentHandler,
    in method 'parentNameFromCategory' (l. 117 in my 5.0.1 file), the
    category is identified by its name, ie not its full path to its
    root. And as the category rules are stored by full path, it cannot
    work. <br>
    So I modified to get the full path here. That corrects the problem
    for sub-category, and generates rules with the correct 'extends'
    part in the big package DRL (and also with "view source" action).<br>
    Another potential problem : the category used to check against a
    gategory rule is only the first one. So for a rule with more than
    one category, this can be a real problem ...<br>
    <br>
    But even with that correction and the proper "extends", my rules
    still ignore the "inherited" LHS.<br>
    After a time (and a lot of testing), I've found that inheritance
    only works if parent rules are defined BEFORE rules extending them.
    In a DRL file written in Eclipse this is not a problem, but Guvnor
    has its own ordering : alphabetical ordering. <br>
    So, to make my category rule work properly, I must name them so that
    they appear before other rules (same order than rules listing in
    grid), for instance "AAAA_something". This is pretty ugly, but I
    suppose it cannot be changed easily ... <br>
    <br>
    I will add a JIRA for the sub-category problem (I checked in the 5.1
    trunk, and it is the same code for that method), and for the
    ordering constraint.<br>
    <br>
    Let me know your feelings about that.<br>
    <br>
    <br>
    Le 22/09/2010 14:44, Vincent Legendre a &eacute;crit&nbsp;:
    <blockquote cite="mid:4C99FA41.7070504@eurodecision.com" type="cite">
      <pre wrap="">  Hi all,

I can't make my rules inherit from category rules.
I saw a JIRA reporting a malfunction for this, but it shoud be corrected.
I am using version 5.0.1
I tried a category rule writen un DRL, or in BRL. Same for rules that 
should inherit the LHS (tested with pure DRL, BRL ...) from one of their 
categories. And yes I tried to inspect the big DRL generated from 
package, and also tried with compiled binary.

Does anyone have some kind of doc or sample using this function ?
Is there some restrictions on rules than can use this, either for 
category rules and/or rules that should inherit some LHS ?

Thanks !



_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <span style="font-size: 13.5pt; font-family:
        &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(21, 24,
        90);">Vincent LEGENDRE</span><br>
      <i><span style="font-size: 8.5pt; font-family:
          &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(21, 24,
          90);">Chef de projets en optimisation</span></i><br>
      <span style="font-size: 4.5pt;"> <br>
      </span>
      <span style="font-size: 9pt; font-family:
        &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(21, 24,
        90);">EURODECISION</span><br>
      <span style="font-size: 9pt; font-family:
        &quot;Arial&quot;,&quot;sans-serif&quot;; color: rgb(21, 24,
        90);">9A rue de la Porte de Buc 78000 VERSAILLES<br>
        T&eacute;l. : +33 (0)1 39 07 12 40<br>
        Direct : +33 (0)1 39 07 26 16<br>
        <a>www.eurodecision.com</a></span><br>
      <a href="http://www.eurodecision.com/"><span style="font-size:
          12pt; font-family: &quot;Times New
          Roman&quot;,&quot;serif&quot;; color: windowtext;
          text-decoration: none;"> <img
            src="cid:part1.06080804.03000002@eurodecision.com"
            alt="EURODECISION" border="no"></span></a><a
        href="http://www.eurodecision.com/"><span style="font-size:
          12pt; font-family: &quot;Times New
          Roman&quot;,&quot;serif&quot;; color: windowtext;
          text-decoration: none;"> </span></a>
    </div>
  </body>
</html>