-
1. Re: Pattern of using StatefulKnowledgeSession in web application
swiderski.maciej Sep 27, 2012 6:58 AM (in response to drupalspring)1 of 1 people found this helpfulthere is no difference if you do not keep any state in your session like facts (for rules evaluation) or timers.
As far as I know StatefulKnowledgeSession is thread safe. For instance jbpm console uses application (single session) scoped session, so I would say it is fine but of course it depends on your requirements.
HTH
-
2. Re: Pattern of using StatefulKnowledgeSession in web application
drupalspring Sep 27, 2012 12:33 PM (in response to swiderski.maciej)Maciej Swiderski wrote:
there is no difference if you do not keep any state in your session like facts (for rules evaluation) or timers.
Does it mean that there are no difference if the process does not involve any timer event or rules evaluation event ?
In other words , can I say that if the process contains timer event or rules evaluation event , then the StatefulKnowledgeSession cannot be application (single session) scoped?
-
3. Re: Pattern of using StatefulKnowledgeSession in web application
swiderski.maciej Sep 27, 2012 1:50 PM (in response to drupalspring)wqe wqe wrote:
Does it mean that there are no difference if the process does not involve any timer event or rules evaluation event ?
we can say so, in terms of working with process instances - meaning if session 1 started a process session 2 can complete it. It does not have to be same session if you don't use its state (facts, timers). But if you do, then same session should be used to ensure the right context for execution.
wqe wqe wrote:
In other words , can I say that if the process contains timer event or rules evaluation event , then the StatefulKnowledgeSession cannot be application (single session) scoped?
That depends on your process definitions, if they can coexists even thou there are shared state they you could do it. That would also depend on your rules definitions.
HTH