[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
Wed Mar 25 06:51:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBRULES-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Heron updated JBRULES-1929:
-----------------------------------
Attachment: patch1929-6.txt
The purpose of this patch is to enable the creation of boundvariable in the rhs
part for a newly inserted fact.
1) add public boundName attribute to
/drools-compiler/src/main/java/org/drools/guvnor/client/modeldriven/brl/ActionInsertFact.java
2) modify /drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/ActionInsertFactWidget.java
to be able to edit a bound variable name
3) modify org.drools.guvnor.client.modeldriven.ui.ActionInsertFactWidget.showAddFieldPopup(Widget)
to add the "bound variable" button where there is a bound variable defined in rhs
4) modify the ruleModel to add the bound variable created in rhs
/drools-compiler/src/main/java/org/drools/guvnor/client/modeldriven/brl/RuleModel.java
org.drools.guvnor.client.modeldriven.brl.RuleModel.getAllVariables()
5) modify org.drools.guvnor.client.modeldriven.ui.RuleModeller.showActionSelector(Widget)
in drools-guvnor to take in consideration that fact inserted in rhs with a bound variable
6) modify method org.drools.guvnor.client.modeldriven.ui.ActionCallMethodWidget.valueEditor(ActionFieldFunction)
to take in accound if we use a rhs bound variable in a field of a function
7) org.drools.guvnor.client.modeldriven.ui.ActionCallMethodWidget.ActionCallMethodWidget(RuleModeller, ActionCallMethod, SuggestionCompletionEngine)
to take in accound if we use a rhs bound variable in a field of a function
9) modify org.drools.guvnor.client.modeldriven.ui.ActionCallMethodWidget.showAddFieldPopup(Widget)
to add the bound button where a bound variable was set for rhs inserted facts.
9) modify org.drools.guvnor.client.modeldriven.ui.ActionValueEditor.boundVariable(ActionFieldValue)
to add the Bound variable created when inserting a new fact in the rhs
10) modify /drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/MethodParameterValueEditor.java
so that the list box contains also the bound variable from the rhs
11 ) modify method org.drools.guvnor.client.modeldriven.ui.ActionSetFieldWidget.ActionSetFieldWidget(RuleModeller, ActionSetField, SuggestionCompletionEngine) to take in account a boundvariable created in the rhs
12)modify and org.drools.guvnor.client.modeldriven.ui.ActionSetFieldWidget.valueEditor(ActionFieldValue)
to take in account a boundvariable created in the rhs
13) Modify the code generation org.drools.guvnor.server.util.BRDRLPersistence.RHSActionVisitor.generateSetMethodCalls(String, ActionFieldValue[]) si that we use the bound variable created in the rhs in the code generation
> 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: Toni Rikkola
> Attachments: CallMethod.pdf, clipboard.png, patch1929-2.txt, patch1929-3.txt, patch1929-5.txt, patch1929-6.txt, path1929_1.txt, Picture2.jpeg, PictureCallMethode.jpeg, PictureCallMethode.jpeg, sourcegenerated.png, suggestion.jpg, 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