Bug 1265773 - @Timestamp and @Expires Java annotations don't work
@Timestamp and @Expires Java annotations don't work
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
high Severity unspecified
: ER4
: 6.2.0
Assigned To: Mario Fusco
Marek Winkler
Depends On:
Blocks: 1266126
  Show dependency treegraph
Reported: 2015-09-23 13:41 EDT by William Antônio
Modified: 2015-10-24 04:36 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1266126 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description William Antônio 2015-09-23 13:41:33 EDT
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 )



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




	public class MyEvent implements java.io.Serializable {



However, it is not working in BRMS 6.1.

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


How reproducible:

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:


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


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 10:11:50 EDT
Fixed by https://github.com/droolsjbpm/drools/commit/13054b4fb
Comment 3 Marek Winkler 2015-10-24 04:36:55 EDT
Verified in BRMS 6.2.0 ER4.

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