[jboss-user] [jBPM] - Persisted process not resuming from wait state

Jason J do-not-reply at jboss.com
Mon Oct 29 16:13:01 EDT 2012


Jason J [https://community.jboss.org/people/jasonjho] created the discussion

"Persisted process not resuming from wait state"

To view the discussion, visit: https://community.jboss.org/message/772878#772878

--------------------------------------------------------------
Environment: jBPM 5.2.0 + Drools 5.3.1 + H2

I have a jBPM flow that is configured for persistence and after a server restart, is reloaded the following way:

{code}
ksession = JPAKnowledgeService.+loadStatefulKnowledgeSession+(session_*id*, kbase, *null*, env);
ksession.addEventListener(listener) // this doesn't seem to work
ksession.fireAllRules()
{code}

At this point, shouldn't the workflow process be restarted?  I can see that there are processinstanceinfo, sessioninfo and eventtype tables in my database, so I know some information was persisted from my original execution.  But why is the event listener not being called after the reload to let me know what node the workflow is currently on, and subsequently, what node the process is traveling to?

In my workflow, let's say I am halfway through and I come across a wait states that looks like the following:

{code}
<intermediateCatchEvent id="_6" name="Wait for Document Approval" >
      <conditionalEventDefinition>
            MyDocument(status == "Approved")
      </...>
</...>
{code}

At this point, a rule is evaluated and changes the state on MyDocument to "Approved", causing this wait state to unblock and move to the next node in the workflow. 

I thought at this point, jBPM would persist the process b/c it is considered a "safe point".  But when my server is restarted and I try to advance the workflow from this wait point (let's say I change the document status to "Approved") - it never moves forward.  Part of me thinks that the worklow is not really running  -- only the rules alone that are being fired in the session.

So my question is - how can I verify that this workflow is correctly restarted and resumed?  I thought the EventListener on the session would be notified of node entry/exit as it does normally. 

Any ideas?
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://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/20121029/ce55c58b/attachment.html 


More information about the jboss-user mailing list