JBoss Community

Re: How to persist a timer

created by Ryan Peterson in jBPM - View the full discussion

I've had similar issues.  The way I worked around mine was to not call the .dispose() method on the ksession until all processes have finished executing.  For some reason calling dispose during processInstance execution put things into a weird state.  Maybe that's how it's supposed to work, its unclear to me if .dispose() should be called every every unit of work (check on the status of a running processInstance for example), or only at the completion of all work.

 

Using the previous approach I also found if the processInstance is persisted while waiting in a timer state, and is retrieved after the timer has expired, the process instance will not continue firing.  Basically the session has to be re-loaded from the DB before timer expiration.

 

I haven't played with the KnowledgeBase, I'll give that a shot & see if there's a better solution that way.

Reply to this message by going to Community

Start a new discussion in jBPM at Community