JBoss Community

Re: jbpm 5.3 after restart server not be created next task

created by franco80 in jBPM - View the full discussion

Hi Thomas

 

I think I have a little different situation:  but I'll try your way.

 


The first time process is created and task is started and completed (in one method), and now, for example: stop the server, the server starts again, the next task started, and the next step task  is complete. Now I don't have next task, workiteminfo was deleted in last operation (complete).

 

I have servlet with init work item handler for new session (question or new session or load always one session, is the difference? or maybe without this servlet and register workitemhandler when process is starting  as you write if I understand ...) :

 

 

UserTransaction ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");

ut.begin();

 

StatefulKnowledgeSession session = JbpmAPIUtil.getExistingSession(37);

JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(session);

CommandBasedWSHumanTaskHandler taskHandler = new CommandBasedWSHumanTaskHandler(session);

taskHandler.connect();

session.getWorkItemManager().registerWorkItemHandler(HUMAN_TASK_NAME,taskHandler);

 

ut.commit();

logger.dispose();

Reply to this message by going to Community

Start a new discussion in jBPM at Community