Timesheet locked by a process - error TMA-0118 or TMA-0122
search cancel

Timesheet locked by a process - error TMA-0118 or TMA-0122

book

Article ID: 27007

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

In reviewing the timesheet process instance, it is stuck and not moving to the next step to completion. Canceling the process instance is not working. What can be done to unlock the timesheet? 

You see one of the below error messages when your process gets stuck attempting to process timesheets.

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.

TMA-0118: This timesheet has been locked by the process engine. One or more timesheets cannot be edited, submitted, approved, or posted.

You (or the time approver) may also not see the employee's (or contractor's) timesheet in your Action Items to approve. 

Environment

All Clarity versions

Cause

It is by design that records are locked by the process. Typically the process completes as intended and the lock is released as expected. However, sometimes 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.

Resolution

  1. Check the state of the Process Engine and make sure that all processes have been processed.  
    • 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  
  2. Run the following query to find out if any timesheets have been locked by a process.  
    • 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.
    • On Premise Customers: Provide the output of the following query into a Microsoft Excel spreadsheet with header rows:

      select odf_locked_attributes.id, 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 srm_resources.id = prtimesheet.prresourceid
  3. 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>
  4. Support can review and query timesheets locked by the process engine. It will involve deleting record(s) from the single table (odf_locked_attributes). Any removals will need approval from you.
  5. On Premise: Provide a copy of the full bg-ca.log file 
  6. If you are still seeing an error, try manually approving the timesheet

Additional Information

See also: Approved timesheets not posting - master KB of known issues