[JBoss JIRA] Closed: (JBRULES-315) Support to Expression and Nested Accessors
by Edson Tirelli (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-315?page=all ]
Edson Tirelli closed JBRULES-315.
---------------------------------
Resolution: Done
Support to expressions added. Example:
rule "eval rewrite"
when
$o : OrderItem( order.number == 10 )
then
results.add( $o );
end
rule "eval rewrite2"
when
$o1 : OrderItem( order.number == 11, $seq : seq == 1 )
$o2 : OrderItem( order.number == $o1.order.number, seq != $seq )
then
results.add( $o2 );
end
rule "eval rewrite3"
when
$o1 : OrderItem( order.number == 12, seq == 1 )
$o : Order( items[1] == $o1 )
then
results.add( $o );
end
rule "eval rewrite4"
when
OrderItem( $nbr : order.number == 13, seq == 1 )
$o : Order( number == $nbr )
then
results.add( $o );
end
rule "map access"
when
$m : Map( this['name'] == "Edson", this.surname == "Tirelli", this['age'] == 28 )
then
results.add( $m );
end
> Support to Expression and Nested Accessors
> ------------------------------------------
>
> Key: JBRULES-315
> URL: http://jira.jboss.com/jira/browse/JBRULES-315
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Michael Neale
> Assigned To: Edson Tirelli
> Priority: Minor
> Fix For: 4.0.0.MR3
>
>
> Would be nice to have a feature like:
> Map(this.foo == bar) as being accessed as: map.get("foo")
> This can work as in the ClassFieldInspector it can tell that there is no "getFoo" method, but there is a get(xxx) method - hence it can pass in the key as the field name (as a string).
> A limitation may be that we want to use a prev bound variable as a key, but I can't see how that will work short of adding new syntax (this currently stays within the current grammar which is good - and looking up fields via a String key is more then useful !).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Updated: (JBRULES-315) Support to Expression and Nested Accessors
by Edson Tirelli (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-315?page=all ]
Edson Tirelli updated JBRULES-315:
----------------------------------
Summary: Support to Expression and Nested Accessors (was: map lookup access for fields)
Description:
Would be nice to have a feature like:
Map(this.foo == bar) as being accessed as: map.get("foo")
This can work as in the ClassFieldInspector it can tell that there is no "getFoo" method, but there is a get(xxx) method - hence it can pass in the key as the field name (as a string).
A limitation may be that we want to use a prev bound variable as a key, but I can't see how that will work short of adding new syntax (this currently stays within the current grammar which is good - and looking up fields via a String key is more then useful !).
was:
Would be nice to have a feature like:
Map(foo == bar) as being accessed as: map.get("foo")
This can work as in the ClassFieldInspector it can tell that there is no "getFoo" method, but there is a get(xxx) method - hence it can pass in the key as the field name (as a string).
A limitation may be that we want to use a prev bound variable as a key, but I can't see how that will work short of adding new syntax (this currently stays within the current grammar which is good - and looking up fields via a String key is more then useful !).
> Support to Expression and Nested Accessors
> ------------------------------------------
>
> Key: JBRULES-315
> URL: http://jira.jboss.com/jira/browse/JBRULES-315
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Michael Neale
> Assigned To: Edson Tirelli
> Priority: Minor
> Fix For: 4.0.0.MR3
>
>
> Would be nice to have a feature like:
> Map(this.foo == bar) as being accessed as: map.get("foo")
> This can work as in the ClassFieldInspector it can tell that there is no "getFoo" method, but there is a get(xxx) method - hence it can pass in the key as the field name (as a string).
> A limitation may be that we want to use a prev bound variable as a key, but I can't see how that will work short of adding new syntax (this currently stays within the current grammar which is good - and looking up fields via a String key is more then useful !).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Created: (JBAOP-384) Add around xml tag
by Flavia Rainone (JIRA)
Add around xml tag
------------------
Key: JBAOP-384
URL: http://jira.jboss.com/jira/browse/JBAOP-384
Project: JBoss AOP
Issue Type: Task
Security Level: Public (Everyone can see)
Affects Versions: 2.0.0.alpha4
Reporter: Flavia Rainone
Assigned To: Flavia Rainone
Priority: Minor
Fix For: 2.0.0.alpha5
Add an "around" tag for around advices, just like before and after:
<around name="..." aspect="...">
This tag is equivlent to the advice tag (so, we can say that around advices are the default type).
With this tag, the user can write clearer xml files, if he/she wants to specify the type of the advice to be an around type.
This tak includes a simple update to the documentation (introduce around in annotated-parameters tutorial chapter, and in the reference manual, xml chapter)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month