Audit

AUTO AUDIT MANAGEMENT

It can record all type of query input and query process automatically.

Example JCONX_QUERY

@DML|DATA|UPDATE CITY SET District = :District WHERE Name=:Name

Need to add @ symbol before JCONX_QUERY.

TRACK USERS & REMARKS

Usage

  1. Create Object for AuditProcess
  2. Assign values
  3. AuditProcess -> user
  4. AuditProcess -> remarks
  5. Pass AuditProcess object to Execute.Process

Process

Executer.process(jconx_query,json_data,auditProcess)
JCONX_QUERY = TYPE|JSON_ROOT_KEY|QUERY

auditProcess -> can track for particular User

Example

AuditProcess auditProcess = new AuditProcess();
auditProcess.user = "UER001";// or UserID/UserEmail which is UNIQUE
String data = Executer.process("@DML|DATA|UPDATE CITY SET District = :District WHERE Name=:Name", "{\"Population\":289900,\"CountryCode\":\"IND\",\"District\":\"Chennai\",\"Name\":\"Herat\"}",auditProcess);
        

TABLE FORMAT

No need to create Tables. It will create table automatically

Table Format : audittrail_month_year
Example : audittrail_1_2017

Table Description

'id', 'int(11)', 'NO', 'PRI', NULL, 'auto_increment'

'process_id', 'varchar(100)', 'YES', '', NULL, ''

'action', 'varchar(100)', 'YES', '', NULL, ''

'old_data', 'longtext', 'YES', '', NULL, ''

'current_data', 'longtext', 'YES', '', NULL, ''

'user', 'varchar(100)', 'YES', '', NULL, ''

'query', 'varchar(2000)', 'YES', '', NULL, ''

'remarks', 'varchar(1000)', 'YES', '', NULL, ''

'createdDate', 'datetime', 'NO', '', NULL, ''