accessControl commitTransaction

Commit of Idle Transaction for Audit Logging

Scénario de test & Cas d'usage

Business Context

An automated audit bot periodically wakes up to check for unauthorized access patterns. It starts a transaction to safeguard its inspection. In this run, no anomalies are found, so no changes are made. The bot must still execute a commit (or rollback) to cleanly terminate the transaction and ensure the session state is reset for the next scheduled run. This tests the action's behavior on an 'empty' or 'clean' state.
About the Set : accessControl

Management of access rights and data security.

Discover all actions of accessControl
Data Preparation

No specific data required, purely session state testing.

Copied!
1/* No specific
2data prep required for this state test */

Étapes de réalisation

1
Start a transaction but perform no modifications (Idle State).
Copied!
1PROC CAS;
2 ACCESSCONTROL.startTransaction;
3 PRINT 'Audit check initiated. No changes required.';
4 RUN;
2
Commit the empty transaction to verify clean termination.
Copied!
1PROC CAS;
2 ACCESSCONTROL.commitTransaction STATUS=s;
3 PRINT 'Commit status: ' || s.statusCode;
4 IF (s.severity == 0) THEN PRINT 'Empty transaction closed successfully.';
5 RUN;

Expected Result


The action returns success (Severity 0) even though no changes were made. The transaction is formally terminated, and the session is confirmed to be free of active transactions, ready for the next audit cycle.