Modified WO_MAT_ACTIONS to not block write operations if critical fields are cleared. Instead it will restore the critical values and allow the write operation to continue.
This commit is contained in:
@ -275,7 +275,6 @@ WRITE_RECORD_PRE:
|
||||
CriticalFields := WO_MAT_RX_BY$:@VM:WO_MAT_REL_DTM$:@VM:WO_MAT_REL_BY$:@VM:WO_MAT_SUB_VEND_CD$:@VM
|
||||
CriticalFields := WO_MAT_CASS_SHIP_QTY$:@VM:WO_MAT_SHIP_SHORT$:@VM:WO_MAT_MU_WAFER_FLAG$
|
||||
|
||||
Continue = True$
|
||||
For each CriticalField in CriticalFields using @VM setting vPos
|
||||
|
||||
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then
|
||||
@ -286,15 +285,16 @@ WRITE_RECORD_PRE:
|
||||
end else
|
||||
CriticalFieldName = 'Error determining field name'
|
||||
end
|
||||
Record<CriticalField> = OrigRecord<CriticalField>
|
||||
|
||||
Recipients = ''
|
||||
SentFrom = 'SYSTEM'
|
||||
Subject = 'WO_MAT_ACTIONS WRITE_PRE Blocked'
|
||||
Subject = 'WO_MAT_ACTIONS - Critical Field Erase Attempt'
|
||||
Message = OConv(Datetime(), 'DT2/^H')
|
||||
Message<2> = 'Computer: ':@Station
|
||||
Message<3> = 'User: ':@User4
|
||||
Message<4> = 'WO_MAT key: ':Name
|
||||
NoteMessage = 'Message: Write operation failed due to readonly field ':CriticalField
|
||||
NoteMessage := ' (':CriticalFieldName:') being cleared.'
|
||||
NoteMessage = 'Readonly field ':CriticalField:' (':CriticalFieldName:') restored.'
|
||||
Message<5> = NoteMessage
|
||||
Message<6> = 'Call Stack:':CRLF$:RetStack()
|
||||
Swap @FM with \0D0A\ in Message
|
||||
@ -302,20 +302,13 @@ WRITE_RECORD_PRE:
|
||||
AttachWindow = 'WO_MAT'
|
||||
AttachKey = Name
|
||||
SendToGroup = 'OI_SYSADMIN'
|
||||
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
OrigFileError = 104:': Write operation failed due to readonly field being cleared.'
|
||||
Status = 0
|
||||
Record = ''
|
||||
ActionFlow = ACTION_STOP$
|
||||
Continue = False$
|
||||
end
|
||||
Until (Continue EQ False$)
|
||||
|
||||
Next CriticalField
|
||||
|
||||
If Continue then
|
||||
SaveRecord = Record
|
||||
|
||||
WaferQty = Record<WO_MAT_WAFER_QTY$>
|
||||
If ( (WaferQty LT 0) or (WaferQty GT 25) ) then
|
||||
@ -608,7 +601,6 @@ WRITE_RECORD_PRE:
|
||||
Null
|
||||
End Case
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
@ -930,4 +922,3 @@ Restore_System_Variables:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user