Dear all,

while testing some of our custom scripts made under v7.2 in the newly v9.6, I had the following situation:

- While testing if an object is locked, the getLockInfo returns always null..

The code runs ok on 7.2, but not on 9.6. - I didn't found any explanation on the script help or either in the documentation...

Here is the code:
 

function objectIsLocked(oObjDef){
/***********************************************************************
 * Checks if a specific Object is locked
 * @param {ARISObject} oObjDef - The ARIS Object to check
 ***********************************************************************/

	var reportcomponentLocking = Context.getComponent("Locking");	
	var oUser = ArisData.ActiveUser();
    var oLockInfo = reportcomponentLocking.getLockInfo(oObjDef);
    var nLockState = oLockInfo.getLockState();
    if (nLockState ==Constants.LOCKING_STATE_UNLOCKED){
        return false;
    }
    else{   
        var sLockOwner = oLockInfo.getLockOwner();
        if (oUser.Attribute(Constants.AT_NAME_LGINDEP, g_nLoc).GetValue(true).equals(sLockOwner)){
            return false
        }
        else{
            return true;
        }
    }
}

What happened to getLockInfo on v9.6 ? Is it a bug ?
Thanks in advance.
 

Tags: ARIS Report Scripting ARIS script script