Hi,<br><br>Starting from 5.4.0.beta2 you can use BRL fragments in decision tables.<br><br>This will allow you to define a column like this:-<br><br>$c : Cucumber()<br>Cucumber( this == $c, numberOfWormHoles &gt; {@holes} )<br>
Cucumber( this == $c, curvaturePerLengthUnit &gt; {@curvature} )<br>Cucumber( this == $c, hue &lt; {@minHue} || &gt; {@maxHue} )<br><br>You will then be presented with columns for each of the &quot;variables&quot; ({@XXX} in the above).<br>
<br>If you do not specify *all* values for a pattern the pattern will not be included in the generated rules. For example:-<br><br>@holes=0, @curvature=&lt;empty&gt;, @minHue=90, @maxHue=150 would generate:-<br><br>$c : Cucumber()<br>

Cucumber( this == $c, numberOfWormHoles &gt; 0 )<br>
Cucumber( this == $c, hue &lt; 90 || &gt; 150 )<br>
<br>You could equally define multiple BRL fragment columns like this:-<br><br>
Column 1 - $c : Cucumber()<br>
Column 2 - Cucumber( this == $c, numberOfWormHoles &gt; {@holes} )<br>
Column 3 - Cucumber( this == $c, curvaturePerLengthUnit &gt; {@curvature} )<br>
Column 4 - Cucumber( this == $c, hue &lt; {@minHue} || &gt; {@maxHue} )<br>
<br>Resulting in the same operation.<br><br>The || requirement makes using a decision table pre-5.4.0.beta2 impossible, however if you could re-think your logic to use &amp;&amp;&#39;s it is possible but messier.<br><br>
With kind regards,<br><br>Mike<br><br><div class="gmail_quote">2012/1/30 Stephen Masters <span dir="ltr">&lt;<a href="mailto:stephen.masters@me.com">stephen.masters@me.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>Hi folks,</div><div><br></div><div>I&#39;m trying to create a DSL (to drive a Guvnor guided editor), for which a rule could be written as:</div><div style="padding-left:24px">Given a cucumber</div><div style="padding-left:24px">
- containing one or more worm holes</div><div style="padding-left:24px">- or with a curvature greater than 10mm per 10 cm length</div><div style="padding-left:24px">- or with a hue of less than 90 degrees</div><div style="padding-left:24px">
- or with a hue of greater than 150 degrees</div><div style="padding-left:24px">Do not put that cucumber on the supermarket shelf</div><div style="padding-left:24px"><br></div><div>(note: I&#39;m actually developing a banking risk management system looking at different types of counterparty ratings, rather than a fruit&amp;veg quality control system, but hopefully the above example is more readable!)</div>
<div><br></div><div>Is there a decent metaphor that could be used by a business user in Guvnor to manage such rules in one place? Or is it likely to be necessary to create multiple rules?
</div><div><br></div><div>As far as I understand, every condition added to a rule through such DSLRs adds itself to the filter. i.e. They are AND rather than OR.</div><div><br></div><div>The other metaphor I could think of is the decision table as a neat interface for generating multiple rules, but that seems to be geared towards creating rules based on multiple values of a single attribute rather than multiple conditions.</div>
<div><br></div><div>I&#39;m trying to keep the user interface as simple as possible, so any thoughts would be appreciated.</div><div><br></div><div>Cheers,</div><div><br></div><div>Steve</div><div><br></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>