vCO Workflow Script to Find and Remove All vCO Locks

The following code finds and removes all vCO locks

 

 

var arrLocks;
	arrLocks = LockingSystem.retrieveAll();

for ( var i = 0; i < arrLocks.length; i++ )
{
	var strLock;
		strLock = arrLocks[i];

	var arrLock;
		arrLock = strLock.split(",");

	System.log("arrLocks[" + i + "] = " + arrLock[0] + ", User = " + arrLock[1]);

	try
	{
		LockingSystem.unlock( arrLock[0], "vcdadmin" );
	}
	catch(strException)
	{
		System.log("strException = " + strException);
	}
}

Leave a Reply