Clarity PPM: Timesheet locked by a Process that may be stuck resulting in error TMA-0118 or TMA-0122

Document ID : KB000027007
Last Modified Date : 27/12/2018
Show Technical Document Details

If we look at the process, we can see that there is something wrong and it is stuck or not moving forward or completing.  What can be done to unlock the Timesheet?

There are two possible error messages that may occur if a process gets stuck trying to process timesheets.
1. TMA-0122: One or more timesheets' status could not be changed because it is locked by a process when trying to run a user-defined timesheet approval process. 
2. TMA-0118: This timesheet has been locked by the process engine. One or more timesheets cannot be edited, submitted, approved, or posted.


It is by design that records are locked by the process. Typically the process completes as intended and the lock is released as expected.
A lock gets placed but never releases due to a process stoppage. 

The process is not able to resume and there is no way to release or unlock the records through the application, therefore causing the timesheet to get stuck.



Run the following query to find out if any timesheets have been locked by a process.  Check the state of the Process Engine and make sure that all processes have been processed.  If there are any results from this query and you have checked to ensure the BPM process is not moving forward or 'stuck' you may need assistance from the Clarity Support Team  to release the lock on these Timesheets.

Capture Screenshots of the Process error that has caused the Timesheet to remain locked 
Capture Screenshots of the Process Engines page showing that the Process Engine is running fine  

On Premise Customers: Provide a copy of the full bg-ca.log file  
On Premise Customers: Provide the output of the following query into a Microsoft Excel spreadsheet with header rows :
select, first_name, last_name, prstart, prstatus,
odf_locked_attributes.odf_pk, prtimesheet.prid timesheet
from odf_locked_attributes, prtimesheet, prtimeperiod, srm_resources
where object_code = 'timesheet'
and attribute_code = 'prstatus'
and odf_locked_attributes.odf_pk = prtimesheet.prid
and prtimesheet.prtimeperiodid = prtimeperiod.prid
and = prtimesheet.prresourceid

To find if there are any locked attributes for a specific timesheet, add the following to the end of the above query: 

and odf_locked_attributes.odf_pk = <internal id of the timesheet>