[jboss-user] [jBPM] - self-transition to node with timer crashes in 4.3

O S do-not-reply at jboss.com
Tue Apr 20 20:38:05 EDT 2010


O S [http://community.jboss.org/people/gelos] created the discussion

"self-transition to node with timer crashes in 4.3"

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

--------------------------------------------------------------
just as the name suggests. used to work in 4.0
issue is with duplicate entry in the execution DB - seems like the order of DB statement execution isn't right

any ideas of a workaround would be appreciated (adding an interim node and transitioning to it and then back is not desireable)

thanks in advance for ideas,
gelos
--------------------------------------------------------------------------------------------------------------------------------------

modified unit test shipped with 4.3 - TimerTransition

<?xml version="1.0" encoding="UTF-8"?>

<process name="TimerTransition" xmlns=" http://jbpm.org/4.3/jpdl http://jbpm.org/4.3/jpdl">

  <start g="19,50,48,48">
    <transition to="guardedWait" />
  </start>

  <state name="guardedWait" g="98,46,127,52">
    <transition name="go on" to="next step" g="-16,-17"/>
    <transition name="timeout" to="escalation" g="-43,-16">
      <timer duedate="1 hour" /> 
    </transition>
    
    <transition name="selft" to="guardedWait" />
  </state>
  
  <state name="next step" g="283,46,83,53"/>
  <state name="escalation" g="118,140,88,52" />

</process>


public void testTimerTransitionContinueBeforeTimerFires() {
    ProcessInstance processInstance = executionService.startProcessInstanceByKey("TimerTransition");
    
    String executionId = processInstance.findActiveExecutionIn("guardedWait").getId();

    // the next line will crash - duplicate row in the DB
    executionService.signalExecutionById(executionId, "selft");
    
    executionService.signalExecutionById(executionId, "go on");
    
    processInstance = executionService.findProcessInstanceById(processInstance.getId());
    
    assertTrue(processInstance.isActive("next step"));

    List<Job> jobs = managementService.createJobQuery()
      .processInstanceId(processInstance.getId())
      .list();
    
    assertEquals(new ArrayList<Job>(), new ArrayList<Job>(jobs));
  }
}

--------------------------------------------------------------

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

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/20100420/823d4547/attachment.html 


More information about the jboss-user mailing list