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