Michał Mański [
https://community.jboss.org/people/mmanski] created the discussion
"Re: Process instance doesn't go on after server reboot"
To view the discussion, visit:
https://community.jboss.org/message/760256#760256
--------------------------------------------------------------
+Thanks+ for the +reply+, but it doesn't resolve my problem.
I started to debug the code in detail and I managed to find the cause and resolve the
problem. It turned out that the cause was as follows the state of ProcessInstanceInfo was
not often saved in the database after process moved to the next task. Thus, old state of
process instance was read after server reboot and process instance couldn't go on to
the next node/task properly.
For entity mapping of ProcessInstanceInfo I used JBPMorm-JPA2.xml that I had found in
jbpm-persistence-jpa-5.3.0.Final.jar. It turned out that the mapping of fields of type
date was incorrect, because these fields were marked with DATE but should have been marked
with TIMESTAMP.
This resulted in not updating state of ProcessInstanceInfo in database. Updates are made
only when value of any field (except of clob column) of the ProcessInstanceInfo is
changed, but often only lastReadDate is changed during process instance execution. Thus,
when many human tasks of the same process instance is executed on the same day, value of
lastReadDate field doesn't change because it ignores the time part of the current
timestamp.
When I changed in date fields mapping from DATE to TIMESTAMP, all process instances are
executed properly after server restart.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/760256#760256]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]