Uploaded image for project: 'BxMS Documentation'
  1. BxMS Documentation
  2. BXMSDOC-5047

Clarify order of events fired by JBPM process engine

    XMLWordPrintable

Details

    • 2020 Week 07-09 (from Feb 10), 2020 Week 10-12 (from Mar 2), 2020 Week 13-15 (from Mar 23), 2020 Week 16-18 (from Apr 13)
    • 6
    • Documentation (Ref Guide, User Guide, etc.)
    • +

    Description

      The order in which the JBPM engine fires events - allowing ProcessEventListener implementations to act upon catching these - is poorly documented, and perhaps counter-intuitive. We need a concise and clear description of this event ordering.

      Running 2 simple processes (straight-through & human task) it would seem that before* and after* events occur pairwise around safe points, with corresponding after* events in the exact opposite order of their before* counterparts.

      Another way of describing this might be: before* events are fired and put on a stack until a safe point is reached, then corresponding after* events are fired by emptying the stack.

      In the case of straight-through processes, this leads to an ordering where the afterProcessStarted event occurs after its corresponding afterProcessCompleted event. Whilst not incorrect, this can be confusing. A developer might assume they may delete a process instance id in the latter handler since they expected this id to have been persisted in the former - as demonstrated by the linked support case.

      Attachments

        Activity

          People

            mramendi Mikhail Ramendik
            rhn-support-ger-jan Gerhardus Johannes Petrus Maria te Dorsthorst
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: