3 Replies Latest reply on Apr 5, 2007 8:41 AM by robroth

    Suspending active timers... what should happen on Resume?

    cpob

      I've tried searching the forum and the JIRA, with no luck.

      I just tested what jBPM (3.1.1) does with a timer when you suspend/resume.

      Here's my scenario:

      - You have a timer that is due in 10 minutes, which gets created when you enter node A.
      - You Enter Node A. Timer is created, you sit for 5 minutes.
      - You then suspend the process instance.
      - While the process instance is suspended, you wait for 10 minutes.

      What should happen when you resume? I feel that jBPM should understand the timer still has 5 minutes to go.

      However, what I'm seeing is, the timer row in the database just gets flipped back to active, and then triggers right after the resume. Sure, 15 minutes passed on a 10 minute timer, but in my mind, suspending a process instance should pause everything about it.

      Thoughts/Discussions?

        • 1. Re: Suspending active timers... what should happen on Resume
          kukeltje

          afaik, the due date is calculated the moment the timer is created. So the behaviour you see is the 'correct' behaviour. Well, at least as implemented (on purpose or as a result of adding 'suspend/resume' later) without thinking about this issue.

          So the duedate is not something that does a countdown, not a 'delta' or whatever. If you want the behaviour you describe, that is an enhancement.

          • 2. Re: Suspending active timers... what should happen on Resume
            cpob

            I actually just wanted to start some discussion and get jBPM-familiar people talking about it, hopefully spurring off some good design talk :)

            It's already something we know we're going to have to code up ourselves, as we need it.

            At the least, I'll probably create a JIRA Feature Request, and add any notes/code/etc if we build it ourselves.

            • 3. Re: Suspending active timers... what should happen on Resume
              robroth

              cpob, I tried to PM and email you without luck. Did you ever find a way to get this to work? Being able to do this is critical to meet our business requirements and we're stumped and could use a pointer.

              Thanks!