Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3999

Attached timer events aren't triggered

    XMLWordPrintable

Details

    • Hide

      Create the process as explained in field description or use the process I'm going to attach. First task handler has to take more than 500 ms for its execution method. The other task handlers can be used to report if the node was visited.

      Show
      Create the process as explained in field description or use the process I'm going to attach. First task handler has to take more than 500 ms for its execution method. The other task handlers can be used to report if the node was visited.

    Description

      I use a process with an embedded subprocess containing two sequential tasks. Following the subprocess is another task and attached to the subprocess is a timer event leading to another task.
      As a handler for the first task inside the subprocess I use an implementation which takes several seconds to complete its execute method (in this case by simply using Thread.sleep). The interval after which the timer should trigger lies within this time span.
      However the task after the timer event is never visited thus the timer is never triggered.
      I would expect the timer to be triggered either a) directly when its interval is reached or b) after the currently executing WorkItemHandler is done processing.

      regarding a): I'm aware that jBPM avoids parallel execution so this would only make sense if the attached timer has the property cancelActivity. In this case it might try interrupting the WorkItemHandler.
      regarding b): This case would work well with avoiding parallel execution. As I expected this behavior I added a second task in the subprocess to be sure triggering the event isn't "swallowed" by the end of the subprocess (which I would consider a bug, too). If cancelActivity is set to true in this case I'm not sure if I would expect a cancel call on the handler that just finished.

      Using Script Tasks inside the subprocess doesn't change a thing. However Human Tasks and Receive Tasks (depending on the implementation) might work as I'm able to trigger the timer when I use a WorkItemHandler which returns from its execute method without calling complete.

      Attachments

        Activity

          People

            swiderski.maciej Maciej Swiderski (Inactive)
            nilsmiehemorpho Nils Miehe (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: