set audit_name [lindex $argv 0]
set state [lindex $argv 1]
set perform 1
if { $audit_name == "BLOCK_MODEL_AUDIT" } {
GuidoApp check_bm "CHECK BM CONNECTED"
$check_bm setParam functionName "BLOCK_MODEL_AUDIT"
set result [$check_bm invoke]
$check_bm destroy
if { $result != "0" } {
set perform 0
}
}
if { $perform } {
GuidoApp app "AUDIT RECORD"
$app setParam record $state
if { $state == "Y" } {
GuidoMessage message "Auditing of $audit_name turned on"
}
if { $state == "N" } {
GuidoMessage message "Auditing of $audit_name turned off"
}
$app setParam audit_name $audit_name
set result [$app invoke]
$app destroy
}
