[jboss-jira] [JBoss JIRA] Closed: (JBRULES-3193) Modify block does not work with variables declared in the consequence
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Wed Aug 31 21:43:26 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-3193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edson Tirelli closed JBRULES-3193.
----------------------------------
> Modify block does not work with variables declared in the consequence
> ---------------------------------------------------------------------
>
> Key: JBRULES-3193
> URL: https://issues.jboss.org/browse/JBRULES-3193
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler
> Affects Versions: 5.2.0.Final, 5.3.0.Beta1
> Reporter: Edson Tirelli
> Assignee: Edson Tirelli
> Fix For: 5.3.0.CR1
>
>
> Reported by Wolfgang:
> ========
> This rule
> {code:title=test.drl|borderStyle=solid}
> rule "test"
> when
> $l : ArrayList() from collect (MyClass (attribute == false));
> then
> for(Object o : new ArrayList( $l )) {
> MyClass o2 = (MyClass) o;
> modify(o2) { setAttribute(true) }
> }
> end
> {code}
> does not compile: The method setAttribute(boolean) is undefined for the type Object
> This, however, works:
> {code}
> modify( (MyClass)o) { setAttribute(true) }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list