[jboss-jira] [JBoss JIRA] (DROOLS-728) Rule with temporal operator incorrectly fires after KieSession serialization.

Tibor Zimányi (JIRA) issues at jboss.org
Wed Jul 11 07:43:00 EDT 2018


    [ https://issues.jboss.org/browse/DROOLS-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13603650#comment-13603650 ] 

Tibor Zimányi commented on DROOLS-728:
--------------------------------------

[~McCloud] is this still relevant? I am going through old JIRAs. I tried your reproducer and one test works, the other one fails on NPE (due to a rule not being fired). 

> Rule with temporal operator incorrectly fires after KieSession serialization.
> -----------------------------------------------------------------------------
>
>                 Key: DROOLS-728
>                 URL: https://issues.jboss.org/browse/DROOLS-728
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 6.2.0.CR4
>         Environment: Mac OS X 10.10.2, Oracle Hotsport 1.7.0_71
>            Reporter: Duncan Doyle
>            Assignee: Mario Fusco
>
> See the following reproducer: https://github.com/DuncanDoyle/drools-serialization-temporal-operators-issue
> Clone the repo and run: 'mvn clean test'
> What I'm trying to do is, for long running CEP sessions, change the underlying KieBase after a KieSession serialisation. The use-case is that our session can hold Events for weeks, maybe months. We periodically save the session to create save points to accommodate for engine crashes (so we can reload).
> We also want to be able to add new rules to our KieBase, without invalidating the session (if we would have to load a new KieSession after we've changed our rules this, would't allow us to use long running CEP sessions, we would loose events). This seems to be possible by serializing the session, and de-serializing it with a new (updated) KieBase.
> And there is where I see strange behaviour. My first unit test works correctly, I serialize the session and de-serialize it with the same KieBase and everything works as expected. However, my second unit-tests de-serializes the KieSession with a new KieBase which has a single additional rule (rule 3). This causes my rule with temporal operator (rule 2 in my reproducer) to incorrectly fire for one of the events (event 1).



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list