<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If it's low risk go ahead and apply it.<div><br></div><div>drools-templates may not be continued in 6.x series though.&nbsp;Espeically if we can get the xls simply as an import/export of the current web based tooling. Drools-template&nbsp;is a community contribution code dump, the contributor did not maintain it further, it's quite complicated for what it is and no one else seems to want to touch it. In hindsight we should not have allowed the contribution.</div><div><br></div><div><br></div><div>Mark<br><div><div>On 11 Jan 2013, at 20:42, Michael Anstis &lt;<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p>Anybody care if I merge this pull request? I was involved with the original emails on drools-user.</p><p>It'd be a shame to let (new?) community involvement slip by.</p><p>sent on the move</p><p>---------- Forwarded message ----------<br>From: "magnusvojbacke" &lt;<a href="mailto:notifications@github.com">notifications@github.com</a>&gt;<br>Date: 22 Dec 2012 15:39<br>Subject: [drools] Fixing issue where indented keywords would fail template expansion. (#170)<br>
To: "droolsjbpm/drools" &lt;<a href="mailto:drools@noreply.github.com">drools@noreply.github.com</a>&gt;<br><br type="attribution"></p><h1>Issue description</h1><p>In template files, whitespaces before keywords would cause exceptions.</p>

<h2>Example of indented "template" keyword</h2><p><code>template header<br>
age<br>
type<br>
log</code></p><p>Gives the exception:<br>
org.drools.template.parser.DecisionTableParseException: Missing header <br>
at org.drools.template.parser.DefaultTemplateContainer.parseTemplate(DefaultTemplateContainer.java:87)</p>

<h2>Example of indented "rule" keyword</h2><p><code>rule "Cheese fans_@{row.rowNumber}"<br>
when<br>
   Person(age == @{age})</code></p><p>Gives the exception:<br>
java.lang.NullPointerException<br>
at org.drools.template.parser.DefaultTemplateColumn.createCellCondition(DefaultTemplateColumn.java:67)</p>

<h1>Patch description</h1>

<ul>
<li>Altered the DefaultTemplateContainer.java to trim lines before comparison.</li>
<li>Added simple unit-test to expose bug / confirm patch</li>
</ul>

<hr>

<h4>You can merge this Pull Request by running:</h4>
<pre>  git pull <a href="https://github.com/magnusvojbacke/drools" target="_blank">https://github.com/magnusvojbacke/drools</a> templates_indented_keywords</pre><p>Or view, comment on, or merge it at:</p><p>&nbsp;&nbsp;<a href="https://github.com/droolsjbpm/drools/pull/170" target="_blank">https://github.com/droolsjbpm/drools/pull/170</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Fixing issue where indented keywords would fail template expansion.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li><strong>M</strong> drools-templates/src/main/java/org/drools/template/parser/DefaultTemplateContainer.java (17)</li>
  <li><strong>M</strong> drools-templates/src/test/java/org/drools/template/parser/DefaultTemplateContainerTest.java (11)</li>
  <li><strong>A</strong> drools-templates/src/test/resources/templates/rule_template_indented.drl (35)</li>
</ul>

<h4>Patch Links</h4>
<ul>
  <li><a href="https://github.com/droolsjbpm/drools/pull/170.patch" target="_blank">https://github.com/droolsjbpm/drools/pull/170.patch</a></li>
  <li><a href="https://github.com/droolsjbpm/drools/pull/170.diff" target="_blank">https://github.com/droolsjbpm/drools/pull/170.diff</a></li>
</ul><p style="font-size:small;color:#666">
              —<br>
              Reply to this email directly or <a href="https://github.com/droolsjbpm/drools/pull/170" target="_blank">view it on GitHub</a>.
            </p>
            <img src="https://github.com/notifications/beacon/YP33oeuhfQ_NWCxYdfpwbRvu_x89wu6mo5Rz6vcdFXeGPpI69R9c6MwJD6o6uVdA.gif" height="1" width="1"><div><br class="webkit-block-placeholder"></div>
_______________________________________________<br>rules-dev mailing list<br><a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-dev<br></blockquote></div><br></div></body></html>