system.kanoa.operators.operatorLogout(sessionInfo, userId)
Logs an operator out of an asset by closing their open mes.operatorAssetSession row (the row where logoutTStamp IS NULL for this userId+assetId pair). There is no separate operator identity - sessionInfo['userId'] is the sec.user being logged out, which can differ from the outer userId param (the actor performing this action, used for changedBy audit).
Parameters
sessionInfo Dictionary
| - assetId | Integer | |
| - tStamp | String | |
| - userId | Integer | the sec.user being logged out |
userId Integer: the actor performing this action (changedBy)
Returns
rowsAffected Integer records modified - 0 if the user had no open session on this asset, or on failure
message String None on success, an error message on failure
Example
sessionInfo = {'userId': 5, 'assetId': 4, 'tStamp': system.date.now()}
userId = 12
rowsAffected, message = system.kanoa.operators.operatorLogout(sessionInfo, userId)