CA Clarity Tuesday Tip: Time Sheet Locks

Discussion created by Shawn_Moore Employee on Sep 27, 2011
Latest reply on May 18, 2018 by varun.chopra.2
Title: CA Clarity Tuesday Tip: Time Sheet Locks

CA Clarity Tuesday Tip by Shawn Moore, Sr. Principal Support Engineer for 09/27/2011

In Clarity there are a couple of different timesheet locks that can occur for different circumstances.

The common errors/warnings generated by these locks are:

TMA-0111: Error updating timesheet. Couldn't obtain lock. Click browser's back button and try again.
TMA-0118: This timesheet's status has been locked by the process engine. It can only be changed by an action item.

Both of these locks are caused by different conditions and are stored in different locations in the database.

1) TMA-0111: This message is due to a timesheet update lock, which is generated during the time the timesheet is being saved. The life of this lock should be milliseconds but it can persist if the system encounter a deadlock or if the system was backed up at the time the timesheet lock was created and restored to another system. This lock can be found under the PRLock table.

i.e. to view all prlock timesheet save locks:

select * from prlock where prtablename = 'PRTIMESHEET'
and prname = '~prTimeEntry'

2) TMA-0118: This message comes from a process based lock, which has a duration that is user activity based. Once a user submits a timesheet in a timesheet process, some set of approvals typically will allow the process to complete and the lock to be freed up. (Since processes can be user defined I won't go into detail on the process itself.) This lock is found in the odf_locked_attributes table.

i.e. to view all process based timesheet locks:

select, first_name, last_name, prstart, prstatus, odf_locked_attributes.odf_pk,
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

Note: At some times you may need to clear out locks. It is best to contact support if you do not know how to do so and we can guide you through the appropriate steps.