Hi everybody.

I configured the session persistence and persisted an instantiated process. When I get the session from the database and use the method getProcessInstances(), it returns an empty collection. But, when I call getProcessInstance(1), and 1 is the InstanceId of the ProcessInstanceInfo (table that contains the process instance), I get the correct process instance. Is this a bug? See the code below.

statefulSession = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, knowledgeBase, null, environment);

Collation<ProcessInstance> processInstances = statefulSession.getProcessInstances(); // FAIL - return empty collection

ProcessInstance processInstance = statefulSession.getProcessInstance(1); // OK - return the process instance


Regards,
Anderson