Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1265773 - @Timestamp and @Expires Java annotations don't work
Summary: @Timestamp and @Expires Java annotations don't work
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ER4
: 6.2.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks: 1266126
TreeView+ depends on / blocked
 
Reported: 2015-09-23 17:41 UTC by William Antônio
Modified: 2020-03-27 19:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1266126 (view as bug list)
Environment:
Last Closed: 2020-03-27 19:10:33 UTC
Type: Bug


Attachments (Terms of Use)
Two projects that shows the issue with annotations and drl (6.28 KB, application/x-gzip)
2015-09-23 17:41 UTC, William Antônio
no flags Details

Description William Antônio 2015-09-23 17:41:33 UTC
Created attachment 1076283 [details]
Two projects that shows the issue with annotations and drl

Description of problem:

urrently to allow the engine to calculate the sliding window, we must make an explicit declaration in the DRL file, for example:

declare StockTick

    @expires( 30m )

end

Source:
https://docs.jboss.org/drools/release/6.2.0.Final/drools-docs/html/ch08.html#d0e10784

However, it should be possible using Java annotations, for example:

@Role(Role.Type.EVENT)

	@Timestamp("theTimestamp")

	@Expires("1s")

	public class MyEvent implements java.io.Serializable {

		…

	}

However, it is not working in BRMS 6.1.

Version-Release number of selected component (if applicable):

N/A

How reproducible:
Always.

Steps to Reproduce:
1. Create a Java object as an event and use the annotations Timestamp and expire to declare the sliding window for this event
2. Use Stream mode for event processing
3. Put a few events in the working memory, which should be retracted according to the rules you set using the expire annotation

Actual results:
The events will not be retracted after it reaches the expiration time.

Expected results:
The events should be retracted.

Additional info:
The same concern can be found in this community thread:

http://stackoverflow.com/questions/30257724/memory-decline-when-use-drools-stream-mode

And other community users have discussed the use of these annotations in Java files in this other community thread:

https://groups.google.com/forum/#!searchin/drools-usage/@Timestamp/drools-usage/YmZE_wlZUnw/twmS0KGYzD4J


Attached to this case you can find a test case provided by customer that shows the issue when only using annotations.

Comment 2 Mario Fusco 2015-09-25 14:11:50 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/13054b4fb

Comment 3 Marek Winkler 2015-10-24 08:36:55 UTC
Verified in BRMS 6.2.0 ER4.


Note You need to log in before you can comment on or make changes to this bug.