if is not 'correct' but imo it is not so much a bug. Who will suspend these tokens anyway. Besides that, they will not influnce the flows in any way. You could file a jira issue, but give it a low priority
I hate resurrecting old threads, but this is relevant to what I just found.
If you have a process with 5 task nodes (one after another). You get half way through, and you suspend the process instance... it will suspend ALL TASKS.
That's ok, I guess, until you resume the process instance. Then it resumes every task instance... which includes setting isOpen = true.
So... it's re-opening every single task that has already been closed. It should be checking the END timestamp on the task instance, and if there is a date, don't re-open it.
If things appear again, reopening old threads is (imo) no problem) Where in the source did you find this? Then I'll have a look. Please include version of jBPM as well.
if there is/was a jira issue for it, please re-open it or add the info to it. If not, please create one. A patch added would be even better and to make it complete, a testcase is best ;-)
This is hapenning in jbpm 3.1.1 and the same code is in 3.1.2 also
Here is the flow:
ProcessInstance.resume() -> rootToken.resume() -> Token.resume() -> resumeTaskInstances() -> TaskMgmtInstance.resume() -> TaskInstance.resume()
and this is the final method which sets these two flags:
isSuspended = false;
isOpen = true;
Which actually opens the task. Since resume of Token class is called recursively, it applies to all the tasks.
AAAAAAAAHHHHHHHHHHHHH d*mn heat overhere. I should have JUST READ THE THREAD..... AGAIN.... sorry guys
:) Yeah, I commented on the existing Jira already.
Sounds like Ronald needs a break ;)