The SessionInfo instance in the database should be deleted once the associated processes are complete. Right now as a workaround we run a script every day to delete the old sessions. Even this is not correct because it doesn't tell whether the session is still being used. Because the state of the object is in a BLOB. But for us this is acceptable because for our workflows we know for sure they cannot span a day.
From: Kris Verlaenen <firstname.lastname@example.org>
Subject: Re: [jbpm-dev] Purging the table data
Date: March 25, 2012 5:22:22 PM PDT
To: Narayanan Arunachalam <email@example.com>
Cc: "firstname.lastname@example.org" <email@example.com>
ProcessInstanceInfo and WorkItemInfo tables are purged automatically when the process instance / work item is no longer needed.
The SessionInfo however is not, as we don't know when a session might be needed to restore its state later (as it might contains state like timers, rule data, globals, etc.).
We were actually looking at adding a method to the ksession, destroy(), that would be similar to dispose() (i.e. release all resources so it can be garbage collected), but also remove it from the database. Could you open a JIRA issue, and leave any feedback you might have on this?
On 03/24/2012 03:46 AM, Narayanan Arunachalam wrote:
The SessionInfo table gets filled for every new session. What is the need for data in this table once the process is complete? I checked the code and looks like no delete operations are found.
Same is the behavior I noticed for ProcessInstanceInfo, WorkItemInfo.