Example of Hierarchy Lock Expiry Scheduler

The hierarchy lock expiry scheduler job unlocks the hierarchy locks that are expired and are no more valid.

The hierarchy locks are valid until the session time out of the application server. After the session times out, the previously set hierarchy locks become invalid. For example, if any hierarchy remains locked for some reason (which is identified by the server as invalid lock), then you can unlock the hierarchy (if you are owner of the lock.) Alternatively, another user who has permissions to release the locks on hierarchies owned by you can also unlock the hierarchy. Note that if a hierarchy is pending in event and a work item is generated, then such locks are not removed by this scheduler as they are still valid locks.
Caution: If a hierarchy is pending in the event and a work item is generated, then the hierarchy remains in the lock state. However, such hierarchy locks are not removed by the hierarchy lock expiry scheduler job as these locks are still valid locks.
You can also schedule the hierarchy lock expiry job to unlock the invalid locks set on the hierarchy. By default, expired hierarchy locks are unlocked after 24 hours. You can change the default value specified in the <JobInputParam name="ExpiryIntervalInHrs">24</JobInputParam> parameter. Use the following sample job defined in the CronSchedules.xml file:
<Schedule>
        <Name>HierarchyLockExpiryScheduler</Name>
        <Jobs>
            <Job>
                <Name>HierarchyLockExpiry</Name>
                <Triggers>
					<!-- trigger every day at mid night, can be tweaked as needed. -->
                    <TriggerExpression>0 0 0 * * ?</TriggerExpression>
                </Triggers>
                <JobDetails>
                    <Description>Class name of the job to be executed when trigger is fired.</Description>
                    <JobDetailsClass>com.tibco.mdm.hm.scheduler.HMLockExpiryScheduler</JobDetailsClass>
                </JobDetails>
                <JobInput>
			<!-- default lock expiry 24 hrs, can be tweaked as needed -->
			<JobInputParam name="ExpiryIntervalInHrs">24</JobInputParam>
                </JobInput>
		<ExecuteOnStartup>false</ExecuteOnStartup>
            </Job>
        </Jobs>
    </Schedule>    
For information on locking and unlocking hierarchy, see the "Locking and Unlocking Hierarchy" section in TIBCO MDM User's Guide.