1 of 1 people found this helpful
I think your problem may be similar with this issue here
The problem is, after you restart the server, there is no component listening to the task completed event broadcasted by Human Task Service.
and there Mauricio Salatino wrote "If your server goes down, you only need to recreate the session and register all the workItemhandlers, globals and the human task handler (special type of workitem) in order to your process continue working."
Recreating session, ok, I have now one global session, but how to register all the workItemHandlers ? some examples ?
Not sure how this will work on your environment, but for me, since I use jbpm-console to start my processes this is what I do as a workaround:
After a server restart, make sure that the first thing that I do is start or execute a new process instance where the process will create a human task after it is created. Usually I execute the Evaluation process sample. After that the Human Task WorkItemHandler will be ready to listen to any task completed events emitted by human task service.
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");
StatefulKnowledgeSession session = JbpmAPIUtil.getExistingSession(37);
JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(session);
CommandBasedWSHumanTaskHandler taskHandler = new CommandBasedWSHumanTaskHandler(session);
... by the way how to register all the workItemhandlers, globals and the human task handler in order to process continue working ?
"When I changed in date fields mapping from DATE to TIMESTAMP, all process instances are executed properly after server restart."
now it works properly
Great to hear that it is solved
I just realized that you use jBPM5.3,
I checked the jBPM5.4 and it seems that this DATE to TIMESTAMP fix has been applied to the default jBPM5.4