Not sure I still understand ;)<br><br>Do you mean to use the *field name* (not it&#39;s value) in the RHS; e.g.<br><br><div style="margin-left:40px"><span style="font-family:courier new,monospace">AccountExposure( $exp : cheese )</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">then</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">insert( new LimitCheck( &quot;cheese&quot; ) );</span><br></div><br>
If so this is not possible without repeating the enum in the [then] DSL 
sentence but obviously users could easily select different values for 
each.<br><br>At the moment I would have to suggest different DSL sentences is probably your only option.<br><br>Or, a different check type dependent on the exposure type?<br><br><div style="margin-left:40px"><span style="font-family:courier new,monospace">AccountExposure( $exp : cheese )</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">then</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">insert( new CheeseCheck( $exp ) );</span><br></div><br>???<br><br><div class="gmail_quote">
On 30 November 2012 15:08, Stephen Masters <span dir="ltr">&lt;<a href="mailto:stephen.masters@me.com" target="_blank">stephen.masters@me.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Apologies for the overly brief explanation ... am at a bank where only internet access is on my phone. Additional apologies if I suffer from auto-correct errors. :)<br><br>[condition][] validate &quot;{exposureType:ENUM:exposure types}&quot; = AccountExposure($exp : {exposure type});<br>
<br>[consequence][] Create limit check = insert(new LimitCheck($exp);<br><br>Now, dependent on what exposure type I select, I need to use a different value to perform conversions between amounts and percentages. So it would keep things clean if I could pass the property name selected in the LHS to the object inserted on the RHS.<br>
<br>I could do it by having different DSL phrases for consequences, but my audience is very non technical so I&#39;m trying to keep the language as minimal as possible.<br><br>Hope that explains it!<br><br>Steve<div class="HOEnZb">
<div class="h5"><br><br><br>Mauricio Salatino &lt;<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>&gt; wrote:<br><br>Hi Steve,<div>Can you please gives us an example about what are you trying to achieve? </div>
<div>Setting a variable in the LHS doesn&#39;t make sense for the common use cases. What we usually do is to bind a variable to a field from our facts, but that&#39;s it.</div>

<div><br></div><div>Cheers</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 2:10 PM, Stephen Masters <span dir="ltr">&lt;<a href="mailto:stephen.masters@me.com" target="_blank">stephen.masters@me.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Stephen Masters &lt;<a href="mailto:stephen.masters@me.com" target="_blank">stephen.masters@me.com</a>&gt; wrote:<br>
<br>
&gt;Hi folks,<br>
&gt;<br>
&gt;I&#39;m trying to set up rules where the RHS is able to refer to a value set in the LHS so that it can perform its logics slightly differently.<br>
&gt;<br>
&gt;I&#39;m able to use $var to pick out fields from facts in working memory. However as far as I can tell I&#39;m not able to set a new value.<br>
&gt;<br>
&gt;I&#39;m setting up a DSL to drive guided rules in guvnor and in the RHS I need to know which value was picked from a drop down list in the LHS.<br>
&gt;<br>
&gt;Cheers<br>
&gt;<br>
&gt;Steve<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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><br clear="all"><div><br></div>-- <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div> - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>


 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div><br>
</div>
</div></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>