While performing a warehouse mobile device operation, a record in WorkTable for a WorkId ending with 001034 gets selected in a standard class as shown below:
Due to a change request in one of the warehouse processes, I have created some code extensions as a result of which this method gets called up again during the same execution cycle for the same WorkId ending with 001034. But unexpectedly, it doesn't select the record this time as shown below:
From what I understood, it is happening because of the combination of readPast method & pessimisticLock @ line 314 & 316 respectively. Somehow, the select happening the 1st time locks the record for selection & therefore when accessing it again the 2nd time, it doesn't get selected even though it should as there are all sort of statements (Committing transaction & closing the connection) written in the end of this method to release any possible locks after 1st select:
I have tried using concurrencyModel table method on WorkTable with different parameter values but that also didn't help to release the lock applied during 1st select & make it available to be used the 2nd time.
Is there any definitive way to release a lock from a record?