Modify and retract on rule consequence must work transparently on facts inserted into
entry points
--------------------------------------------------------------------------------------------------
Key: JBRULES-2063
URL:
https://jira.jboss.org/jira/browse/JBRULES-2063
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.0.CR1
Reporter: Edson Tirelli
Assignee: Edson Tirelli
Fix For: 5.0.0.GA
Must ensure facts inserted into entry points support modify and retract calls
transparently.
package org.drools;
global java.util.List results;
declare StockTick
@role( event )
end
rule "Test entry point 1"
when
$st : StockTick( company == "ACME", price > 10 ) from entry-point
"stream1"
then
results.add( Double.valueOf( $st.getPrice() ) );
modify( $st ) { setPrice( 110 ) }
end
rule "Test entry point 2"
when
$st : StockTick( company == "ACME", price > 100 ) from entry-point
"stream1"
then
results.add( Double.valueOf( $st.getPrice() ) );
retract( $st );
end
--
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