[jboss-user] [jBPM] - Re: ProcessEventListener methods executed twice

Sebastien Lelarge do-not-reply at jboss.com
Tue Oct 18 21:08:35 EDT 2011


Sebastien Lelarge [http://community.jboss.org/people/slelarge] created the discussion

"Re: ProcessEventListener methods executed twice"

To view the discussion, visit: http://community.jboss.org/message/632405#632405

--------------------------------------------------------------
After some further test, I manage to make the solution based on AgendaEventListener work but ONLY WHEN A NEW SESSION is created.
In my application, i query the sessiontable at startup and I load the existing StatefulSession if I find an entry in this table.
If no previous session was created, I created one (see below)
            // check if there is an existing session in the DB
            // if a session is found, then restore it else create a new one
            int existingSessionId = findLastKnowledgeSessionID();
            if (existingSessionId != -1) {
                ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(existingSessionId, base, kconfig, env);
            } else {
                   ksession =  JPAKnowledgeService.newStatefulKnowledgeSession(base, kconfig, env);
            }


In case where I load the previous session then the Agenda Event Listener is not triggered...
When I look in the nodeinstancelog table, I can see that the engine enters the Rule node (type = 0) but it hangs. 

Any idea ?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/632405#632405]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111018/2f1cc1ff/attachment-0001.html 


More information about the jboss-user mailing list