<div>Mat,</div>
<div>&nbsp;</div>
<div>The option of binding and setting variables is already available in 4.0.1 GA release of the BRMS. I&#39;ve just replied to a similar post. Suppose you&#39;ve already defined some &quot;when&quot;&nbsp;constraint on an object of type Person and you want to set the attribute name in the Then part:
</div>
<div>&nbsp;</div>
<div>
<div>When you define your When in the BRMS, there is an option to assign a variable to the expression. In the When part, there should be a little green triangle beside Person. Click on this to get a dialog called &quot;Modify constraints for Person&quot;. At the bottom of this dialog is an option to set a variable name to bind to Person. Type p, or whatever you want into the text box and then click the Set button beside the text box. You should now have a When constraint of the form p:Person(...). Now create a Then action by clicking the + at the RHS of the Then part. A dialog will appear called &quot;Add a new action&quot;. The first two options allows you to pick the variable&nbsp;p you just created - choose the second option if you want to update p into the Working memory after modifying it. You should now see something like Set [p] in the Then part. Click on the Green triangle above Set [p] and you will get a dialog called &quot;Add a field&quot; with a list of the fields in the Person class. Choose the one you want to set (
e.g. name). What this does is actually call the method&nbsp;called setName (Press View Source button to see). The Set action should now have a text box where you can enter the name parameter</div>
<div>&nbsp;</div>
<div>Regards</div>
<div>Shahad</div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 10/3/07, <b class="gmail_sendername">Drouin.Mathieu</b> &lt;<a href="mailto:Mathieu.Drouin@cic.gc.ca">Mathieu.Drouin@cic.gc.ca</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Ok, I&#39;ve read the rules, seems like I was infringing on #11. I might be<br>violating #3 by sending this one though :)
<br><br><a href="https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/">https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/</a><br>trunk/target/docs/shared/images/Chapter-Examples/BRMS_Guided.png
<br><br>Is the guided editor with variable binding (shown above) going to be<br>available in v.4.0.2? If not, is it possible to achieve a similar result<br>without the help of DSL?<br><br>Thanks,<br><br>Mat<br><br><br><br>
<br><br><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>