Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-3862

AbstractBpm5Action is registering handlers too freely

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.11
    • Fix Version/s: 4.11 CP1
    • Component/s: Process flow
    • Labels:
      None

      Description

      Explanation from Rick Wagner's BZ :

      AbstractBpm5Action is doing some handler registration for each process instance start and service callback:
      ....
      ksession.getWorkItemManager().registerWorkItemHandler("JBossESB", esbhandler);
      ksession.getWorkItemManager().registerWorkItemHandler("ESBAction", actionhandler);
      ksession.getWorkItemManager().registerWorkItemHandler("Human Task", khandler);

      'khandler' in particular is an instance of CommandBasedHornetQWSHumanTaskHandler by default.

      So when the user goes to close a task, all those handlers fire (JPA trips up, too):

      012-08-22 12:32:06,006 INFO [STDOUT] (Thread-32) Notification of completed task 132
      2012-08-22 12:32:06,017 INFO [STDOUT] (Thread-34) Notification of completed task 132
      2012-08-22 12:32:06,025 INFO [STDOUT] (Thread-35) Notification of completed task 132
      2012-08-22 12:32:06,033 INFO [STDOUT] (Thread-36) Notification of completed task 132
      2012-08-22 12:32:06,042 INFO [STDOUT] (Thread-37) Notification of completed task 132
      2012-08-22 12:32:06,049 INFO [STDOUT] (Thread-37) Notification of completed task 132
      2012-08-22 12:32:06,056 INFO [STDOUT] (Thread-38) Notification of completed task 132
      2012-08-22 12:32:06,063 INFO [STDOUT] (Thread-39) Notification of completed task 132
      2012-08-22 12:32:06,069 INFO [STDOUT] (Thread-40) Notification of completed task 132
      2012-08-22 12:32:06,076 INFO [STDOUT] (Thread-41) Notification of completed task 132
      2012-08-22 12:32:06,082 INFO [STDOUT] (Thread-41) Notification of completed task 132

      2012-08-22 12:32:05,985 INFO [STDOUT] (Thread-31) Notification of completed task 132
      2012-08-22 12:32:05,998 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (Thread-31) Could not synchronize database state with session
      org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): org.jbpm.persistence.processinstance.ProcessInstanceInfo#44
      at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1782)
      .......
      at org.jbpm.task.service.hornetq.CommandBasedHornetQWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedHornetQWSHumanTaskHandler.java:273)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tcunning Thomas Cunningham
                  Reporter:
                  tcunning Thomas Cunningham
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: