[jboss-user] [jBPM] - Persisted jbpm5: 'delay timer' behavior after JBoss restart

Victor Zorin do-not-reply at jboss.com
Mon May 2 03:03:42 EDT 2011


Victor Zorin [http://community.jboss.org/people/zorin] created the discussion

"Persisted jbpm5: 'delay timer' behavior after JBoss restart"

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

--------------------------------------------------------------
We are testing implementation of JBPM5 plugin for Liferay portal, where JBoss is run independently from Liferay.

 In our persisting setup (JBoss5.1.0GA + drools-5.2.0M1 + jbpm-bpmn2-5.0.0) we ran a simple test case when 'delay timer' is defined as:

    <intermediateCatchEvent id="_7" name="Timer" >
      <timerEventDefinition>
        <timeCycle>120s</timeCycle>
      </timerEventDefinition>
    </intermediateCatchEvent>


Once process instance hits this event, JBoss is manually shut down and immediately restarted.

Session is reloaded using the following code:

  java.util.Properties sessionProperties = new java.util.Properties();
  sessionProperties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
  sessionProperties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
  KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(sessionProperties);                    
   StatefulKnowledgeSession resultSession = JPAKnowledgeService.loadStatefulKnowledgeSession(
          storedSession.getId(), // we get it from own records
          KnowledgeUtil.getInstance().getKnowledgeBase(),
          config, getEnvironment());

The ISSUE is:

CASE #1: If StatefulKnowledgeSession is reloaded before the expiry of 'delay timer', process wakes up properly. PERFECT !
CASE #2: If StatefulKnowledgeSession is reloaded after the expiry of 'delay timer', timer is stuck, i.e. nothing happens. PROBLEM !
(Timer works properly when JBoss is not restarted)

That means those process instances, which have timers may get stuck forever (if shutdown time falls to timer expiry), i.e. JBoss can not be reliably restarted.

Any thoughts on this?
--------------------------------------------------------------

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

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/20110502/b2c2f195/attachment.html 


More information about the jboss-user mailing list