We are using JBPM to manage business process workflow in our application and JBPM is configured to run in persisted mode, with details being logged in JBPM_* tables in DB2 in our case.
We are getting following errors in usage of JBPM API:
1. Token is already locked by another Token [<123>]
2. Transition to '<State1>' does not exist on State(<State2>)'
Related to error #1, we have checked JBPM API and found that it is expected during call of signal() function if Token is already locked (that is isLocked() returns true). Further to this we checked and confirmed that there is no explicit call from application code to lock Token (like Token.signal(String lockOwnerId)). Thus we are NOT locking token on process instances, still it is reported to be locked at runtime. Can anyone please confirm if JBPM internally locks the token during the time of handler execution on State/ Node? If yes, how these locks, which are internal by JBPM and not persisted in DB, are getting exposed to other threads/ sessions at application level and are creating problem for process execution by throwing error #1 (Token is already locked by another Token [<123>]).