<div>I think you may write a litte compiler to generate this rule of rules. ;)</div>
<div>or just write 5 templates.<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 8/6/08, <b class="gmail_sendername">psentosa</b> &lt;<a href="mailto:psentosa@yahoo.com">psentosa@yahoo.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Hi all,<br><br>This newbie has the following problem:<br><br>I&#39;d like to let rules-creator to input something arbitrary, and the<br>
corresponding rules are produced.<br>To be concrete, he&#39;d like to be able to write the following condition:<br><br>When<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I play only on &quot;Monday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;<br>Then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&#39;ll get 3000<br><br>But it should also be possible that he only inputs &quot;Monday&quot;, or<br>&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;.<br>So the number of days to be input should be arbitrary.<br>
With my current understanding, I could only put some placeholders (in the<br>example above:<br><br>I play only on {day1} {day2} {day3} .....&nbsp;&nbsp;--&gt; $player : Player (1stday ==<br>{day1} &amp;&amp; 2ndday == {day2} &amp;&amp; 3rdday == {day 3})<br>
<br>I&#39;ll get {number} --&gt; $player.setPayment(number)<br><br>Hope I explained this correctly...any tipps? Or should I really create on<br>template for 1 day only, another template for 2 days only, and so on?<br>Thanks a lot<br>
<br>--<br>View this message in context: <a href="http://www.nabble.com/How-to-create-DSL-template-that-produces-rules-based-on-arbitrary-user%27s-input--tp18850282p18850282.html">http://www.nabble.com/How-to-create-DSL-template-that-produces-rules-based-on-arbitrary-user%27s-input--tp18850282p18850282.html</a><br>
Sent from the drools - user mailing list archive at Nabble.com.<br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>