I think that you are mixing a lot of concepts here. Don't get me wrong, it usually happens. The concept of save point also includes Human Tasks. Human interactions are considered as long living activities. For that reason the engine need to wait until the task is completed. As you mention all this waiting happens in a database, so you don't need to be worried about the application is running or not. Obviously the task server needs to be up when the user cames back and want's to interact, but it doesn't mean that needs to be up all time. Right now in jBPM5, we keep two different things persisted.
1) A knowledge runtime snapshot (SessionInfo in the database)
2) The status of each particular task inside the task server.
The task server is configured to use persistence by default, but as far as I remember, it's configured to use an in memory database. You should go and change that to a real database like MySQL/Postgres.
For having persistence of your processes status, that you will need if you are using human tasks interactions you need to use JPAKnowledgeService helpers to keep your sessions persisted in a database.
Hi , I am also facing a similar issue. After lauching a process in a session , if i Restart my Human Task Server and try Completing the Task by loading the same session, Tasks get Completed but the Workflow does not move forward. Does somebody have any thoughts ?
Could you please give more details about how you are making it? I mean, some test case that can help to understand why it is not moving forward.
After re loading the same session, are you registering the CommandBasedWSHumanTaskHandler again to it?
Yes, as Demian says, you need to re register the listener if the server goes down. Make sure that after the server start again the active session is registered and connected with that instance of the task server.
Hey Demain, This is what am doing.
1) Launching the process with a new StatefulKnowledgeSession.
2) Calling ksession.dispose after launching the process.
3) Claiming the Task for a user
4) Restarting my Human Task Server.
5) ksession.dispose() method do not make the session as "null". I could see that ksession is still available during Completing the Task.
6) When I Complete the Tasks gets Completed but the Workflow does not move forward.
I found the solution. After Restarting the Human Task Server we need to load the Session that created the Task and use below code to register the handler once again with the Session and Connect it before performin the Complete Operation
CommandBasedWSHumanTaskHandler wsHumanTaskHandler=new CommandBasedWSHumanTaskHandler(ksession);