OK.<br><br>I tried here (admittedly with 5.2, but I don&#39;t believe we&#39;ve changed the area in question much - if at all).<br><br>These are the steps I followed (which might highlight an additional step not clear in the book):-<br>
<ul><li>&lt;Complete up to step 5&gt;</li><li>Click on the pencil icon (as you have done)</li><li>Select the &quot;sales&quot; field</li><li>The field &quot;sales&quot; will be shown with another pencil icon</li><li>Click on the &quot;new&quot; pencil icon and you are given the option of a literal value or a formula.</li>
<li>Choose formula....</li></ul>Let me know if this helps?<br><br>Thanks,<br><br>Mike<br><br><div class="gmail_quote">On 21 June 2011 11:05, marros <span dir="ltr">&lt;<a href="mailto:martin.roscoe@vships.com">martin.roscoe@vships.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The book is the PAKT Publishing book JBoss Drools Business Rules by Paul<br>
Browne.<br>
<br>
Am using Drools 5.1 and Guvnor 5.0.0.SNAPSHOT 25673M<br>
<br>
Using the guided editor to create a rule that states if a sale has a value<br>
of over 100 then discount it by 10.<br>
<br>
Have partly created a rule as exactly how the book says as follows:<br>
<br>
1. Create a new rule and add a condition using a sales fact (This has been<br>
done OK.)<br>
2. When adding the first constraint, enter a variable name (mySales) (this<br>
has been doen OK)<br>
3. Select GREATER THAN OR EQUAL TO in the PLEASE CHOOSE drop-down box, and<br>
use the pencil icon to enter the value (100) - (this has been done OK)<br>
4. On the second line of the newly created rule, click on the green arrow<br>
above SALES. An option to bind the actual sales total to a variable is<br>
shown. In this dialog box, assign it to salesValue (this has been done OK)<br>
5. In the guided editor, The Add new Action dialog box now has additonal<br>
options. Click on the green + sign whcih is next to THEN to make these<br>
options appear. In this dialog box choose to modify the mySales fact (This<br>
has been done OK)<br>
<br>
The next bit is the bit that I cannot get to work:<br>
<br>
Back in the guided editor, click on the pencil icon and enter the formula<br>
(=salesValue-10)<br>
<br>
What happens is that when you click to add the formula - you do not get that<br>
option, you only get an option to ADD A FIELD and it shows a list of<br>
available fields<br>
<br>
I have gone upt to step 5 and viewed the source which is as follows:<br>
<br>
1.      rule &quot;SalesDiscount&quot;<br>
2.          no-loop true<br>
3.          dialect &quot;mvel&quot;<br>
4.          when<br>
5.              mySales : Sales( salesvalues : sales &gt;= &quot;100&quot; )<br>
6.          then<br>
7.              update( mySales );<br>
8.      end<br>
<br>
<br>
Which is as it should be up to step 5 (according to the book)<br>
<br>
What it should look like after adding the formula is:<br>
<br>
rule &quot;SalesDiscount&quot;<br>
    no-loop true<br>
    dialect &quot;mvel&quot;<br>
    when<br>
        mySales : Sales( salesvalues : sales &gt;= &quot;100&quot; )<br>
    then<br>
        mySales:setSales( salesValue-10)<br>
        update( mySales );<br>
end<br>
<br>
Hope this explains - I am also very new to Drools and trying to learn<br>
<br>
Many Tanks<br>
<br>
--<br>
Best Regards<br>
<br>
Marros<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Guvnor-guided-editor-problem-add-more-options-tp3087495p3090032.html" target="_blank">http://drools.46999.n3.nabble.com/Guvnor-guided-editor-problem-add-more-options-tp3087495p3090032.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<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>