-
1. Re: Task complete operation without process goes on
eaa Sep 16, 2012 7:59 AM (in response to rosidoti)Did you restore your session from the db after you restarted the server and BEFORE you completed the task?
The session must be in memory so the HT Server can communicate with it.
Best Regards
-
2. Re: Task complete operation without process goes on
rosidoti Sep 16, 2012 11:41 AM (in response to eaa)Hi esteban,
no I did not.
But it's strange, sorry if i say those words ... but if i'm playng with client api invoking mothods such as client.complete(taskId...) why I have to restore session (on the server side)
that is an information that server can retrieve on task table using taskid such as key ... however I tried your suggestion and it works.
tx a lot
-
3. Re: Task complete operation without process goes on
eaa Sep 16, 2012 12:01 PM (in response to rosidoti)The answer is because you where interacting with Human Task API but not with process runtime API. Strange as it sounds, the relation between HT server and session is loosly-coupled. When you complete a task the HT server informs this event to all the registered listeners. If you didn't restore the ksession, there is no listener there.
Best Regards,
-
4. Re: Task complete operation without process goes on
rosidoti Sep 16, 2012 12:31 PM (in response to eaa)Ok Esteban, I hope that this discussion doesn't going to be a "fight" (sorry for my bad english ...) and may be useful to enhance this great project. But there is something that doesn't sound good for me, let me try to expplain, may be that there is something I don't see in the API architecture/design.In order to restore the session I have to know the bpmn file i'm using to describe the process because if i don't read (again) the bpmn file i get e nullpointer excption about the process.
So that means that the restore operation has to be perfomed by the "thread" or client application that is performing client.complete(...) operation too. Thus this restoring can't be performed by the server its self ...
my 2 cents
roby
-
5. Re: Task complete operation without process goes on
eaa Sep 16, 2012 12:51 PM (in response to rosidoti)The restore operation must be performed before the task is completed but not necesarelly by the same thread or application. In order to restore a session you need a kbase containing the definition of the process.
Let's asume you have 1 kbase per application, what you could do is: when the application is started, you restore all the ksessions you have (this information is not easy to retrieve from jbpm's predefined DB and I usually store it myself) using the kbase.
Best Regards,
-
6. Re: Task complete operation without process goes on
rosidoti Sep 16, 2012 5:49 PM (in response to eaa)I know that u r sayng but the difficulty is, in my case that I have 4 types of process (4 bpmn files), to link the sessions to be restored with their related bpmn file.
However i will follow your suggestion to store the association (sessionId,"bpmn file") outside the standard db tables.
Tx Esteban for your very clear responses!