<html><body><div>Hi Mike,</div><div><br></div><div>I watched your blog/video about the BRL fragment functionality in decision tables (<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>) a few weeks back. It sounds like it provides some of the template capabilities I remember from working with Fico Blaze Adviser a little while back. I was wondering why I was struggling to reproduce it, but I guess I need to wait for 5.4 to go live as I don't think using a beta version would be a great idea here!</div><div><br></div><div>I think that for now I'll opt for multiple rules, as there *should* not be too many. With some sensible use of categories and work items, hopefully I can keep the interface clean enough for now.</div><div><br></div><div>However I reckon I'll have a go at running up a 5.4.0.beta2 environment to try this out. I'd like to see whether I can take advantage of it to improve things ready for an update when things go final.</div><div><br></div><div>Thanks for the pointers.</div><div><br></div><div>Steve</div><div><br><br>On Jan 31, 2012, at 12:00 PM, Michael Anstis <michael.anstis@gmail.com> wrote:<br><br></div><div><blockquote type="cite"><div class="msg-quote">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 > {@holes} )<br> Cucumber( this == $c, curvaturePerLengthUnit > {@curvature} )<br>Cucumber( this == $c, hue < {@minHue} || > {@maxHue} )<br><br>You will then be presented with columns for each of the "variables" ({@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=<empty>, @minHue=90, @maxHue=150 would generate:-<br><br>$c : Cucumber()<br> Cucumber( this == $c, numberOfWormHoles > 0 )<br> Cucumber( this == $c, hue < 90 || > 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 > {@holes} )<br> Column 3 - Cucumber( this == $c, curvaturePerLengthUnit > {@curvature} )<br> Column 4 - Cucumber( this == $c, hue < {@minHue} || > {@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 &&'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"><<a href="mailto:stephen.masters@me.com" data-mce-href="mailto:stephen.masters@me.com">stephen.masters@me.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><div>Hi folks,</div><div><br></div><div>I'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" data-mce-style="padding-left: 24px;">Given a cucumber</div><div style="padding-left:24px" data-mce-style="padding-left: 24px;">- containing one or more worm holes</div><div style="padding-left:24px" data-mce-style="padding-left: 24px;">- or with a curvature greater than 10mm per 10 cm length</div><div style="padding-left:24px" data-mce-style="padding-left: 24px;">- or with a hue of less than 90 degrees</div><div style="padding-left:24px" data-mce-style="padding-left: 24px;">- or with a hue of greater than 150 degrees</div><div style="padding-left:24px" data-mce-style="padding-left: 24px;">Do not put that cucumber on the supermarket shelf</div><div style="padding-left:24px" data-mce-style="padding-left: 24px;"><br></div><div>(note: I'm actually developing a banking risk management system looking at different types of counterparty ratings, rather than a fruit&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'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" data-mce-href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" data-mce-href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> <br></blockquote></div><br><div class="_stretch">_______________________________________________<br> rules-users mailing list<br> <a href="mailto:rules-users@lists.jboss.org" data-mce-href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" data-mce-href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></div></blockquote></div></body></html>