JBoss Community

Problem in JPAWorkItemManager when completing a task

created by Juan Gago in jBPM - View the full discussion

Hi all!

I'm trying to integrate jBPM 5.2 (workflow with human tasks) in a Spring application with JPA. I am using CommandBasedWSHumanTaskHandler for the persistence of tasks generated in the workflow. Everything works fine except when running the response handler to complete a task (GetCompletedTaskResponseHandler). The applicaton uses the JPAWorkItemManager, but when it tries to complete the task to continue with the flow, error occurs because the manager uses the context stored in the environment of the session (StatefulKnowledgeSessionImpl) to retrieve the WorItemInfo. The problem is because the context has a connection to the EntityManager closed.

What could be the problem?, Will I have misconfigured the session?, What class should be responsible for opening the connection to the EntityManager and store the context in the session environment for JPAWorkItemManager use?

 

Thanks!

Reply to this message by going to Community

Start a new discussion in jBPM at Community