Description of problem:
I have a simple "start -> HumanTask -> end" process.
When I complete that task in the task list a modal appears with the following error:
"Unexpected error encountered: org.kie.internal.runtime.manager.SessionNotFoundException: No session found for context 8"
The modal does appear only in cases when Details panel remains opened after completing task. When the details panel is automatically closed (not sure what triggers that), the error modal still appears after I reopen Details Panel (select All filter in tasks table and then click the completed task).
The error seems to appear only when PER_REQUEST and PER_PROCESS_INSTANCE runtime strategies are used. For SINGLETON strategy it seems to work OK.
There is no exception in server.log
Version-Release number of selected component (if applicable):
BPM Suite 6.1.0 ER5 deployed on EAP
Steps to Reproduce:
1. Start instance of simple process with just 1 Human task
2. Complete the task in task list
Modal with error appears. In case it doesn't appear immediately, select All filter in tasks table and click the row for completed task -> Details Panel opens and with it the error modal appear.
No error modals when completing tasks / seeing task details.
There is another symptom of this issue : Task Detail panel contains no data for such a tasks (see screenshot)
Created attachment 994318 [details]
Task details empty
it was indeed affecting only per request and per process instance because when request or process instance is completed ksession id destroyed and by that access to runtime engine was causing this exception even though ksession was not accessed.
This was improved to delay the session id check until actually ksession is taken from runtime engine instead of when runtime engine is taken from manager.
No more modal with error on process completion as described in Description. The behavior mentioned in comment 1 and 2 is expected and will not be fixed, because tasks are deleted from the DB after process is completed.
Verified with BPM Suite 6.1.0 ER6