-
1. Re: jbpm 5.3 after restart server not be created next task
thomas.setiabudi Dec 16, 2012 7:59 PM (in response to franco80)1 of 1 people found this helpfulHi Franco80,
I think your problem may be similar with this issue here
https://issues.jboss.org/browse/JBPM-3673
The problem is, after you restart the server, there is no component listening to the task completed event broadcasted by Human Task Service.
Regards,
Thomas Setiabudi
-
2. Re: jbpm 5.3 after restart server not be created next task
franco80 Dec 17, 2012 7:46 AM (in response to thomas.setiabudi)Does it mean that there is a solution or not ? I ask
because in link https://issues.jboss.org/browse/JBPM-3673 solution will be in jbpm 6, but I found https://community.jboss.org/message/583571and 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 ?
regards
-
3. Re: jbpm 5.3 after restart server not be created next task
thomas.setiabudi Dec 17, 2012 7:58 PM (in response to franco80)Hi Franco80,
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.
Regards,
Thomas Setiabudi
-
4. Re: jbpm 5.3 after restart server not be created next task
franco80 Dec 18, 2012 5:54 AM (in response to thomas.setiabudi)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();
... by the way how to register all the workItemhandlers, globals and the human task handler in order to process continue working ?
regards
-
5. Re: jbpm 5.3 after restart server not be created next task
franco80 Dec 18, 2012 7:43 AM (in response to franco80)solution is in https://community.jboss.org/thread/205435?decorator=print&displayFullThread=true
"When I changed in date fields mapping from DATE to TIMESTAMP, all process instances are executed properly after server restart."
now it works properly
regards
-
6. Re: jbpm 5.3 after restart server not be created next task
thomas.setiabudi Dec 18, 2012 8:01 PM (in response to franco80)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
Regards,
Thomas Setiabudi