1 Reply Latest reply on Jun 1, 2014 7:04 PM by krisverlaenen

    Restore a jPBM session in case of AS crash

    prisma15

      Hi, I'm quite new to jbpm,

      I'd like to restore the session in case of AS's crash. What I've found so far (even asking on community's forums: https://community.jboss.org/thread/165545?start=15&tstart=0, https://community.jboss.org/thread/203151, https://community.jboss.org/thread/241481) is that using a singleton session when I then restart the server, I already have all the pending processes loaded in the session.

      Now, given that I have the instances of the pending processes, how do I resume each process' execution ?

      I've already got suggestions about how to use completeWorkItem API but that way the pending WorkItem will not actually be resumed, just marked completed even if it has not re-executed its logic.

      May you guys please point me out a link, or an example which is supposed to do the same thing we want to?

      Any help would be greatly appreciated.

      Thanks a lot in advance.

        • 1. Re: Restore a jPBM session in case of AS crash
          krisverlaenen

          It depends on what architecture you are using.  For example, when using the execution server that comes by default with our web tooling, you don't have to do anything, it will restart all required services automatically.

           

          When you embed the engine, you typically also don't have to do anything other than reinitialize the RuntimeManager (in case you are using timers, if not you can even do that lazily).  The reason you don't have to resume process execution is that they are already in a wait state when then are saved into the database.  So they are waiting for some trigger before they can continue.  As soon as this trigger arrives, they can continue execution by reloading their previous state from the database (even in case of AS failure) at the start of the request.