Before you work on a JIRA could you please provide an (abbreviated) example of a template that causes both errors?<br>-W<br><br><div class="gmail_quote">2011/11/3 Bruno Freudensprung <span dir="ltr">&lt;<a href="mailto:bruno.freudensprung@temis.com">bruno.freudensprung@temis.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><u></u>

  

    
  
  <div text="#000000" bgcolor="#ffffff">
    Hi all,<br>
    <br>
    I am writing rules using Drools Templates and I noticed strange
    problems (ocurring when I slightly modify a DRT that works well): <br>
    <ol>
      <li>the template instanciation depends on the declarations order
        of the parameters in the template header</li>
      <li>if the rule template does not contain a package declaration
        (default package) the instanciation of the template fails</li>
    </ol>
    I am working with Drools 5.1.1 but those problems occur in
    5.2.0.Final and in 5.3.0.Final as well.<br>
    Do you think it is worth posting a JIRA?<br>
    <br>
    Anyway let me tell you that Drools Templates are great! Our users
    like that feature a lot! They start writing a rule in DRL format
    and, once it works, they transform it into a DRT and put data into a
    tsv file. It is quite a natural way of working. The general
    perception here is that it is easier to &quot;templatize&quot; an existing DRL
    than to write a decision table from scratch.<br>
    <br>
    Best regards,<br>
    <br>
    Bruno.<br>
    <br>
    PS:<br>
    <br>
    <u>DRT that works well</u>:<br>
    <br>
    <tt>template header<br>
      <b>name<br>
        message<br>
        <br>
        package templates;<br>
      </b><br>
      import org.drools.bug.Entity;<br>
      <br>
      template &quot;TestTemplate&quot;<br>
      rule &quot;Test1 @{row.rowNumber}&quot;<br>
          dialect &quot;mvel&quot;<br>
          when<br>
              Entity( $name : name == &quot;@{name}&quot; )<br>
          then<br>
              System.out.println(&quot;@{message}&quot; + $name);<br>
              insert($name);<br>
      end<br>
      end template<br>
    </tt><br>
    <u>DRT that does not work</u> (first case):<br>
    <br>
    <tt>template header<br>
      <b>message<br>
        name<br>
        <br>
        package templates;<br>
      </b><br>
      import org.drools.bug.Entity;<br>
      <br>
      template &quot;TestTemplate&quot;<br>
      rule &quot;Test1 @{row.rowNumber}&quot;<br>
          dialect &quot;mvel&quot;<br>
          when<br>
              Entity( $name : name == &quot;@{name}&quot; )<br>
          then<br>
              System.out.println(&quot;@{message}&quot; + $name);<br>
              insert($name);<br>
      end<br>
      end template</tt><br>
    <br>
    <br>
    <u>DRT that does not work</u> (second case):<br>
    <br>
    <tt>template header<br>
      <b>name<br>
        message<br>
      </b><br>
      import org.drools.bug.Entity;<br>
      <br>
      template &quot;TestTemplate&quot;<br>
      rule &quot;Test1 @{row.rowNumber}&quot;<br>
          dialect &quot;mvel&quot;<br>
          when<br>
              Entity( $name : name == &quot;@{name}&quot; )<br>
          then<br>
              System.out.println(&quot;@{message}&quot; + $name);<br>
              insert($name);<br>
      end<br>
      end template</tt><br>
    <br>
    <br>
  </div>

<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>