Looking at the 5.1 snapshots, these sections have not been updated since the 5.0 release. I'm looking at a 5.1 snapshot I
downloaded on 11/2/09.<br><br>The relevent sections, specifically 5.1.7 and 5.2, seem to have errors and/or omissions and those sections should have the information I'm looking for. Unfortunately I don't know what the correct info should be, so I can't
submit an edit myself.<br>
<br>
As an example, from the last part of 5.1.7:<br>
<snip><br>
<p><a id="d0e6181">The code to run this is simple:</a></p>
<pre class="programlisting"><a id="d0e6181">KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();<br>DecisionTableConfiguration dtconf = KnowledgeBuilderFactory.newDecisionTableConfiguration();<br>dtconf.setInputType( DecisionTableInputType.XLS );<br>
dtconf.setWorksheetName( "Tables_2" );<br>kbuilder.add( ResourceFactory.newInputStreamResource( getSpreadsheetStream() ),<br> ResourceType.DTABLE,<br> dtconf );<br><br>Collection<KnowlegePackage> kpkg = kbuilder.getKnowlegePackages();<br>
</a></pre>
<p><a id="d0e6181">We create an ExternalSpreadsheetCompiler object and use it to
merge the spreadsheet with the rules. The two integer parameters
indicate the column and row where the data actually starts - in our
case column 2, row 2 (i.e. B2)</a></p>
<p><a id="d0e6181"></snip></a></p>
<p><a id="d0e6181">The docs discuss creating an
ExternalSpreadsheetCompiler in the example to merge the spreadsheet
with the rules template, but the example is for a standard DecisionTable, without a custom template.</a></p>
<p>In section 5.2, it goes over templates, but does not discussion optional values or array values.</p>
<p>I have reviewed the Drools-Example files. There is an example in
there of using array values, but not an example using optional values,
which is what I particularly need.</p>
<br><br><div class="gmail_quote">On Tue, Nov 24, 2009 at 1:17 AM, Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
An extensive rewrite of the section dealing with Templates was done in<br>
the early stages of 5.0, and it ought to be available with current<br>
snapshot releases. The relevant section is 5.2, Templates.<br>
<br>
-W<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
On 11/24/09, Adam Rinehart <<a href="mailto:adam.rinehart@gmail.com">adam.rinehart@gmail.com</a>> wrote:<br>
> I am trying to research using a rule template driven by data from a<br>
> spreadsheet, rather than using a straight decision table.<br>
><br>
> I understand I need to use the ExternalSpreadsheetCompiler but am finding a<br>
> distressing lack of information about the template format.<br>
><br>
> The 5.0 docs seem to have mistakes; the code example for that section looks<br>
> to have been cut & pasted from another section and does not match the text<br>
> description of what is going on.<br>
><br>
> Using google, the best I could find was a blog posting from Steven Williams<br>
> on Aug 26, 2008: <a href="http://blog.athico.com/2008/08/drools-rule-templates.html" target="_blank">http://blog.athico.com/2008/08/drools-rule-templates.html</a><br>
><br>
> In this blog posting, he said it was the first of 3 examples from the<br>
> drools-examples project. But I could not find any additional blog postings<br>
> by him on this subject.<br>
><br>
> Does anyone know of additional documentation or examples on how rule<br>
> templates work?<br>
><br>
> Specifically, how to do optional columns, and array columns, similar to how<br>
> the built in decision tables feature works?<br>
><br>
> Adam<br>
><br>
</div></div>_______________________________________________<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>
</blockquote></div><br>