Level: Integer;
The Level property returns nesting level of an operation.
It is relevant for the operation that was executed on some object as a result of executing operations on the object that depends on it. Operations list has to have a tree view.
Sub Main;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogon: IAuditLogons;
OperatTree, OperatTreeChild: IAuditOperations;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
Al := MS.OpenAuditLog;
ALogon := AL.OpenLogons(False);
OperatTree := Al.OpenOperationTree(ALogon.Session, 0);
While Not OperatTree.Eof Do
Debug.WriteLine(OperatTree.ObjectId + " " + OperatTree.Name);
OperatTreeChild := Al.OpenOperationTree(ALogon.Session, OperatTree.Operation);
While Not OperatTreeChild.Eof Do
If OperatTreeChild.Succeeded Then
Debug.Indent;
Debug.WriteLine(OperatTreeChild.ObjectId + " " + OperatTreeChild.Name + " " + OperatTreeChild.Level.ToString);
Debug.Unindent;
OperatTreeChild.Next;
End If;
End While;
OperatTreeChild.Close;
OperatTree.Next;
End While;
OperatTree.Close;
End Sub Main;
After executing the example the list of operations of the access protocol that were performed during the last connection to the platform, is displayed in the development environment console. The list of operations is viewed as a tree. An identifier of the relevant object and an operation name are displayed for each operation. If there are operations that are connected to the objects on which any other object depends, the level of nesting is found for these operations.
See also: