[jboss-jira] [JBoss JIRA] (DROOLS-4393) expire facts before fire rules

Alberto Fanjul Alonso (Jira) issues at jboss.org
Mon Aug 5 05:33:00 EDT 2019


     [ https://issues.jboss.org/browse/DROOLS-4393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Fanjul Alonso reopened DROOLS-4393:
-------------------------------------------


After asking cu the issue was bad explained, although the reproducer is still valid:

There's a rule RG_SAME_ID and a rule RG_COLLECT. After advance the clock 3 hours, a fact with same id than previous one is added

```
DummyFact firstFact = new DummyFact(1, now);
```

and 

```
DummyFact thirdFact = new DummyFact(1, now + TimeUnit.HOURS.toMillis(3));
```

While third fact is expired and do not fire the RG_SAME_ID rule, it is present on collect(DummyFact) from RG_COLLECT rule.

[~mfusco] Let us know if that makes a difference and there's anything to improve on collect function.		
	 

> expire facts before fire rules
> ------------------------------
>
>                 Key: DROOLS-4393
>                 URL: https://issues.jboss.org/browse/DROOLS-4393
>             Project: Drools
>          Issue Type: Feature Request
>          Components: core engine
>    Affects Versions: 7.24.0.Final
>            Reporter: Alberto Fanjul Alonso
>            Assignee: Mario Fusco
>            Priority: Major
>         Attachments: reproducer-02425402.zip
>
>
> Is there any option to expire the facts before fireAllRules()?
> A reproducer for drools 6.5.0.Final-redhat-25 (tested too on 7.23.0.Final-redhat-00002 and 7.24.0.Final) shows that facts are not expired until we run fireAllRules().
> Trying reproducer:
> Show facts are expired after fireAllRules():
> ```
> unzip -d reproducer reproducer-02425402.zip
> cd reproducer
> git checkout master
> ./run.sh
> ```
> Show facts are not expired before fireAllRules():
> ```
> git checkout original
> ./run.sh
> ```



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list