[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-1040) Multi-pattern accumulate support
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Thu Sep 20 16:20:25 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1040?page=all ]
Edson Tirelli resolved JBRULES-1040.
------------------------------------
Fix Version/s: 4.0.2
(was: FUTURE)
Resolution: Done
Support for multi-pattern accumulate was added. Example:
Rule: Add to the Cheesery, all Cheese pieces whose type there are Persons who like it:
rule "MultiPatternAccumulate" salience 80
when
$cheesery : Cheesery( totalAmount > 30 )
from accumulate( $person : Person( $likes: likes) and $cheese : Cheese( type == $likes ),
init( Cheesery cheesery = new Cheesery(); ),
action( cheesery.addCheese( $cheese ); ),
reverse( cheesery.removeCheese( $cheese ); ),
result( cheesery ) );
then
results.add( $cheesery );
end
All connectives used in the source must be explicitly defined, like the "and" in the above example.
Support still needs to be added to the XML parser and documentation needs to be written. Will open new tickets for these jobs.
> Multi-pattern accumulate support
> --------------------------------
>
> Key: JBRULES-1040
> URL: http://jira.jboss.com/jira/browse/JBRULES-1040
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Reteoo, Drl Parser/Builder
> Affects Versions: 4.0.0.GA
> Reporter: Geoffrey De Smet
> Assigned To: Edson Tirelli
> Fix For: 4.0.2
>
>
> [Edson said there might be already such an issue, but I couldn't find it looking through jira.]
> Something like this should be possible:
> $multipleQueensHorizontal : Long()
> from accumulate(
> $q1 : Queen($id : id, $y : y);
> Queen(id > $id, y == $y);
> , count($q1)
> );
--
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
More information about the jboss-jira
mailing list