I have created basic flow that uses async fork (based on the example from jBPM package) and it runs properly as a test case but causes errors when running on JBoss AS. Attached all files (jPDL, java classes and ftl).
The issue is that sometimes it does work but sometime it throws following exception:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.model.ExecutionImpl#10065]
but the execution goes down to the next node - in this case to task node. Entire log for one execution of this process is attached as log file.
I tried on two data bases: HSQLDB and PostgreSQL.
I tried both async and exclusive for the fork node but no difference at all.
Is there anything I am doing wrong?!