[jboss-jira] [JBoss JIRA] Commented: (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

Toni Rikkola (JIRA) jira-events at lists.jboss.org
Wed Mar 18 05:05:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBRULES-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12457832#action_12457832 ] 

Toni Rikkola commented on JBRULES-1929:
---------------------------------------

I have been taking a look at this: "it only takes the method with one parameter but there must be at least one field with one setter. " 
It looks like a class called ClassFieldInspector collects all the fields from a class. And if there is a method that starts with "set" then there is a bug that adds all the methods from this class as fields and these fields are then used by the guided editor. So it is not a bug  that you need a setter in the class in order to use the other methods, it is a bug that you can use the other methods if there is a setter in the class.

I'm going to investigate if it is better to create another inspector class to search the other methods or to expand this one. Because the guided editor needs the method information and it would be nice to know the parameters for the methods too.

> 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, patch1929-2.txt, patch1929-3.txt, path1929_1.txt, Picture2.jpeg, PictureCallMethode.jpeg, PictureCallMethode.jpeg, 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