<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>A simple tip when creating DSLs:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><b><font size="4">Write an example rule as DRL first!</font></b></div><div><br></div><div>:)</div><div><br></div><div>Then, if it's working DRL code (get familiar with unit testing rules) use DSL to map 'plain English' phrases to the DRL code you just wrote.</div><div><br></div><div>It's then also worth writing a simple unit test around a hand-cranked DSRL rule which uses your DSL, before sticking it in Guvnor.</div><div><br></div><div><br></div><div><br></div><br><div><div>On 18 Feb 2013, at 16:16, Esteban Aliverti &lt;<a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">In the sentence 'Transaction.setChargeFee( true)', 'Transaction' is not making reference to the fact (unless you have bound it and you are not showing that piece) but to the class named '</span><span style="font-family:arial,sans-serif;font-size:13px">Transaction'.</span><div>

<font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Best Regards,<br></font><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>

</span></div></div></div><div class="gmail_extra"><br clear="all"><div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Blog @ <a href="http://ilesteban.wordpress.com/" target="_blank">http://ilesteban.wordpress.com</a></div>


<br><br><div class="gmail_quote">On Mon, Feb 18, 2013 at 4:48 PM, IPatel <span dir="ltr">&lt;<a href="mailto:ishita.patel@usbank.com" target="_blank">ishita.patel@usbank.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Thank you for your response.<br>
<br>
Here is the another option i used. Instead of using variable $item. I used<br>
the fact itself as following:<br>
[then] Charge a fee = Transcation.setChargeFee( true)<br>
<br>
when i used this i am getting "There was an error executing the consequence<br>
of rule"...<br>
<br>
Any idea how can i fix this??<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/When-Then-In-DSL-Rule-tp4022407p4022410.html" target="_blank">http://drools.46999.n3.nabble.com/When-Then-In-DSL-Rule-tp4022407p4022410.html</a><br>


<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<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></div>
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users</blockquote></div><br></body></html>