Hi all,
I am facing a problem with persisted stateful knowledge
session, please help me. My rule is listed as below:
package com.sample
import com.sample.Event;
import java.util.List;
declare Event
@role(event)
end
rule "test"
when
$list : List() from collect(Event() over window:
length(2))
then
System.out.println("----print out in rule,
size of
the list collected from window is:" + $list.size());
end
The problem is,
when use a normal stateful session(created by the calling
kbase.newStatefulKnowledgeSession()), *when a third fact inserted, the
session working memory only retains list of 2, as expected.*
when use a persisted stateful session(created by the calling
JPAKnowledgeService.newStatefulKnowledgeSession()), insert 2 facts first.
Then restore this session by
JPAKnowledgeService.loadStatefulKnowledgeSession(), and *insert a third
fact, the session working memory grows to list of 3?*
By the way, I am using version 5.2.0.Final. And after I upgrade
to version 5.4.0.Final, the test result of persisted session becomes to
normal.*The attachment is my test program and you can repeat it.*
I want to ask you if there is something missing that I need to
do in 5.2.0.Final?
Thank you in advance, any help will be appreciated.
http://drools.46999.n3.nabble.com/file/n4019766/drools-session-persis-dem...
drools-session-persis-demo.zip
--
View this message in context:
http://drools.46999.n3.nabble.com/problem-with-pesisted-stateful-knowledg...
Sent from the Drools: User forum mailing list archive at
Nabble.com.