[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1929) In the then part (RHS) of guided rule editor, it is not possible to affect a value with variable name of the when part (LHS) and not possible to call a method in the new created instance
Nicolas Heron (JIRA)
jira-events at lists.jboss.org
Mon Mar 9 05:43:39 EDT 2009
[ https://jira.jboss.org/jira/browse/JBRULES-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Heron updated JBRULES-1929:
-----------------------------------
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
Here is the patch I did :
1) I modifier the ActionValueEditor class in org.drools.guvnor.client.modeldriven.ui
so that this class has now a new constructor :
ActionValueEditor(final ActionFieldValue val, final DropDownData enums, RuleModeller model, String variableType)
I had to add a reference to the ruleModeller to get the bound fact list in the RuleModel Instance
and the same to the variableType that is now given by the classes : ActionInsertFactWidget, ActionCallMethodWidget and ActionSetFactWidget as they themself do not know on which variable they are working on. But they knwow on the variable class but the name is not the same in those three classes (the attributes used in those three classe are named "factType" or "variableName"). So I give the name to the ActionValueEditor.
In the 3 classes, I modified the call code to add the two new parameters.
2) in the class ActionValueEditor, I added the code to propose a list of bound variables in the lhs that are type compatible with the current variable
Now I still have to do the path for the second parts
> In the then part (RHS) of guided rule editor, it is not possible to affect a value with variable name of the when part (LHS) and not possible to call a method in the new created instance
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBRULES-1929
> URL: https://jira.jboss.org/jira/browse/JBRULES-1929
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-guvnor
> Affects Versions: 5.0.0.M4
> Reporter: Nicolas Heron
> Assignee: Michael Neale
> Attachments: path1929_1.txt, View1.png, View2.png
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> In drl, the rule would look like this :
> when
> p : Person()
> c : Car (owner == p)
> then
> Insurrance i = new Insurrance();
> i.setPerson(p);
> c.addInssurance(i);
> end
> This cannot be done with the guided editor in Guvnor for "i.setPerson(p);"
> and also, il is not possible to call a metthod on a (LHS) defined fact outside the variables set/get methods "c.addInssurance(i);"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list