As well, I have another question. Why would one want to restore the ksession? To get the tasks associated to a user, I can always use the TaskClient,
TaskClient client =
new TaskClient(new MinaTaskClientConnector("web client", new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
client.getTasksAssignedAsPotentialOwner(userId,
LANGUAGE, responseHandler);
Can I always create a new session when the server restarts. I am assuming the only reason we would persist the Ksession is to get the process instance using the sessionId? Is there a way to fetch an existing processInstance with a new ksession. Leads to the question, what is the recommendation as to the lifecycle of a ksession. Can I create new sessions always?