-
Bug
-
Resolution: Obsolete
-
Major
-
jBPM 3.2.5.SP5
-
None
We deploy ProcessDefinition on application startup and use this one persisted instance during application activity in several threads (i.e. during full application live time). We noticed that during concurrent Timers creation for several processes which build from this ProcessDefinition instance we've got:
org.hibernate.HibernateException: identifier of an instance of org.jbpm.graph.def.Action was altered from 532 to 533
After investigation I've noticed that Action instance is persisted anew (not updated) in concurrent threads and new row appears in the table. The problematic place is in org.jbpm.db.JobSession.saveJob where Action is checked on existence in Hibernate Session's persistent context. The suggested fix is to changed condition:
!session.contains(action)
to
action.getId() == 0L
This change fixes our problem.