We have also added the ability to use BRL Fragments as columns in the guided Decision tables (for 5.4.0.beta2).<br><br><a href="http://blog.athico.com/2012/01/guided-decision-table-supports-brl.html">http://blog.athico.com/2012/01/guided-decision-table-supports-brl.html</a><br>
<br>You could then define a column as:-<br><br>$c : Company()<br>Company (this == $c, something = {templateKey} )<br><br>In rows where you don't specify a value for "templateKey" remaining patterns (i.e. "$c : Company()") are still appended to the resulting DRL.<br>
<br>Furthermore the bound Company, $c, can be referenced either in other BRL fragments or regular decision table columns.<br><br><div class="gmail_quote">On 20 January 2012 09:25, Swindells, Thomas <span dir="ltr"><<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There isn't a nice way to do this unfortunately.<br>
One hack around it is to have two columns with the object merged across them<br>
The first column would have the condition $a : Company(this != $param), every cell in the column is then given the value 'null'.<br>
This would then always ensure that $a will always exist. The second column can then be written as normal with your optional condition.<br>
<br>
Thomas<br>
<div><div class="h5"><br>
> -----Original Message-----<br>
> From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-">rules-users-</a><br>
> <a href="mailto:bounces@lists.jboss.org">bounces@lists.jboss.org</a>] On Behalf Of swaroop<br>
> Sent: 20 January 2012 08:34<br>
> To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> Subject: [rules-users] Can we set a default value for emlpty cells in Drools<br>
> templates<br>
><br>
> Hi,<br>
><br>
> I am trying to write a template and came across a scenario where one of the<br>
> condition cell $a : Company(condition), When<br>
> condition is left blank then entire predicate is missed and iam using the ref of<br>
> the company obj $a to set some values which is failing as the declaration part<br>
> is missing, So i was thinking, if we can have a default value to the cell as $a :<br>
> Company(), then the scenario will be handled.Kindly let me know how to<br>
> implement the default value for a cell in template to overcome the above<br>
> mentioned scenario<br>
><br>
><br>
> Thanks<br>
> Swaroop<br>
><br>
> --<br>
> View this message in context: <a href="http://drools.46999.n3.nabble.com/Can-we-" target="_blank">http://drools.46999.n3.nabble.com/Can-we-</a><br>
> set-a-default-value-for-emlpty-cells-in-Drools-templates-<br>
> tp3674849p3674849.html<br>
> Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
<br>
</div></div>**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br>