Added logging to the Dialog Response Log, and refactored Scheduling services to buffer error message and add to error stack before returning.
This commit is contained in:
@ -93,7 +93,7 @@ Equ ACTION$SPEC_SURFSCAN_RECIPE TO 8
|
||||
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, Set_Property, Send_Event, Database_Services
|
||||
Declare subroutine Dialog_Box, Msg, MemberOf, obj_WO_Mat, Get_Property, obj_React_Status, Get_Status, Override_Services
|
||||
Declare subroutine record_lock, obj_React_Status, Post_Event, obj_React_State, obj_Post_Log, Qa_Services, Reactor_Services
|
||||
Declare Subroutine Rds_Services, WO_MAT_Services, Message_Box, Reactor_Log_Services, Schedule_Services
|
||||
Declare Subroutine Rds_Services, WO_MAT_Services, Message_Box, Reactor_Log_Services, Schedule_Services, Dialog_Response_Log_Services
|
||||
|
||||
Declare function dialog_box, msg, Get_Status, obj_WO_Mat, Get_Status, obj_Clean_Insp, obj_Reactor, Get_Property
|
||||
Declare function QA_Services, Database_Services, Set_Property, Rds_Services, Qa_Services, Memberof, Reactor_Services
|
||||
@ -315,6 +315,9 @@ Event PUB_SIGN.CLICK()
|
||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TWLogResult
|
||||
If TWLogResult NE True$ then
|
||||
ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload'
|
||||
Dialog_Response_Log_Services('AddDialogResponseLog', RDSNo, 'RDS', @User4, 'HTR_LAST_BOX_TW', 'Test wafer not logged when one was required. Unload signature was blocked. User was prompted.')
|
||||
end else
|
||||
Dialog_Response_Log_Services('AddDialogResponseLog', RDSNo, 'RDS', @User4, 'HTR_LAST_BOX_TW', 'Test wafer was logged when one was required. Unload signature was allowed. User was prompted.')
|
||||
end
|
||||
If ErrMsg NE '' then
|
||||
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$)
|
||||
@ -322,6 +325,8 @@ Event PUB_SIGN.CLICK()
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end else
|
||||
Dialog_Response_Log_Services('AddDialogResponseLog', RDSNo, 'RDS', @User4, 'HTR_LAST_BOX_TW', 'Test wafer was logged prior when one was required. Unload signature was allowed. User was not prompted.')
|
||||
end
|
||||
end
|
||||
end else
|
||||
@ -474,3 +479,4 @@ Setup_OLE_Controls:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -51,6 +51,7 @@ Declare function GetTickCount
|
||||
Declare Subroutine Scan_Services, Memory_Services, Database_Services, SRP_JSON, QA_Services, Error_Services
|
||||
Declare Subroutine obj_WO_Mat_Log, Tool_Parms_Services, RDS_Services, Logging_Services, Supplement_Services
|
||||
Declare Subroutine Test_Run_Services, WO_MAT_Services, Reactor_Log_Services, Schedule_Services, Mona_Services
|
||||
Declare Subroutine Dialog_Response_Log_Services
|
||||
|
||||
Equ CRLF$ to \0D0A\
|
||||
|
||||
@ -1175,12 +1176,16 @@ Service ProcessScanData(ScanID, ScanJSON)
|
||||
LastCassInWoTestWaferReqMsg = ''
|
||||
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
|
||||
LastCassInWoTestWaferReqMsg = 'No material scheduled. Test wafer required.'
|
||||
Dialog_Response_Log_Services('AddDialogResponseLog', RDSNo, 'RDS', @User4, 'HTR_LAST_BOX_TW', 'No test wafer ran with box when one was required. Unload signature was blocked. User was notified.')
|
||||
end else If NextEventHasSamePsn EQ False$ then
|
||||
LastCassInWoTestWaferReqMsg = 'Next work order is a NEW PSN number. Test wafer required.'
|
||||
Dialog_Response_Log_Services('AddDialogResponseLog', RDSNo, 'RDS', @User4, 'HTR_LAST_BOX_TW', 'No test wafer ran with box when one was required. Unload signature was blocked. User was notified.')
|
||||
end
|
||||
|
||||
Scan_Services('AddNotAcceptableReason', LastCassInWoTestWaferReqMsg)
|
||||
end
|
||||
end else
|
||||
Dialog_Response_Log_Services('AddDialogResponseLog', RDSNo, 'RDS', @User4, 'HTR_LAST_BOX_TW', 'Test wafer was already logged with box. Unload signature was allowed. User was not prompted.')
|
||||
end
|
||||
|
||||
WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
|
||||
@ -2415,3 +2420,4 @@ ClearCursors:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -805,6 +805,7 @@ end service
|
||||
Service GetCurrentEvent(ReactNo)
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'GetCurrentEvent'
|
||||
ErrorMsg = ''
|
||||
|
||||
SchedDetKey = ''
|
||||
If ReactNo NE '' then
|
||||
@ -819,18 +820,23 @@ Service GetCurrentEvent(ReactNo)
|
||||
Response = SchedDetKey
|
||||
end else
|
||||
ErrorMsg = 'Error in service ':Service:' module. Error code ':errCode
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
GoSub ClearCursors
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service CurrentEventIsBlock(ReactNo)
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'CurrentEventIsBlock'
|
||||
ErrorMsg = ''
|
||||
|
||||
If ReactNo NE '' then
|
||||
CurrentSchedDetKey = Schedule_Services('GetCurrentEvent', ReactNo)
|
||||
@ -847,20 +853,24 @@ Service CurrentEventIsBlock(ReactNo)
|
||||
end else
|
||||
Error = Error_Services('GetMessage')
|
||||
ErrorMsg = 'Error in service ':Service:' module. ':Error
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in service ':Service:' module. Invalid reactor number.'
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service GetNextEvent(ReactNo)
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'GetNextEvent'
|
||||
ErrorMsg = ''
|
||||
|
||||
SchedDetKey = ''
|
||||
If ReactNo NE '' then
|
||||
@ -875,25 +885,27 @@ Service GetNextEvent(ReactNo)
|
||||
ReadNext SchedDetKey else EOF = True$
|
||||
If EOF EQ True$ then
|
||||
ErrorMsg = 'Error in service ':Service:' module. No incomplete events in schedule'
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end else
|
||||
ReadNext SchedDetKey else EOF = True$
|
||||
If EOF EQ True$ then
|
||||
ErrorMsg = 'Error in service ':Service:' module. No incomplete events in schedule after current event'
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end else
|
||||
Response = SchedDetKey
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in service ':Service:' module. Error code ':errCode
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
GoSub ClearCursors
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service GetEngagedEvent(ReactNo)
|
||||
@ -945,6 +957,7 @@ end service
|
||||
Service NextEventIsSamePsn(ReactNo)
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'NextEventIsSamePsn'
|
||||
ErrorMsg = ''
|
||||
|
||||
Response = False$
|
||||
If ReactNo NE '' then
|
||||
@ -987,16 +1000,21 @@ Service NextEventIsSamePsn(ReactNo)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in service ':Service:' module. Invalid reactor number.'
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service NextEventIsBlock(ReactNo)
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'NextEventIsBlock'
|
||||
ErrorMsg = ''
|
||||
|
||||
If ReactNo NE '' then
|
||||
NextSchedDetKey = Schedule_Services('GetNextEvent', ReactNo)
|
||||
@ -1013,15 +1031,18 @@ Service NextEventIsBlock(ReactNo)
|
||||
end else
|
||||
Error = Error_Services('GetMessage')
|
||||
ErrorMsg = 'Error in service ':Service:' module. ':Error
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in service ':Service:' module. Invalid reactor number.'
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
@ -3598,3 +3619,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user