Add errors last

This commit is contained in:
Chase Tucker
2025-08-26 09:10:15 -07:00
parent 47405863d7
commit a196bffd41
7 changed files with 152 additions and 163 deletions

View File

@ -1127,6 +1127,7 @@ Service CopyRDSLayerParameters(RDSNo)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'CopyRDSLayerParameters' MetricName = 'CopyRDSLayerParameters'
ErrMsg = ''
If (RDSNo NE '') then If (RDSNo NE '') then
RunOrderNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X') RunOrderNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X')
If (RunOrderNo GT 1) then If (RunOrderNo GT 1) then
@ -1172,15 +1173,17 @@ Service CopyRDSLayerParameters(RDSNo)
Next CopyRDSLayerKey Next CopyRDSLayerKey
end end
end else end else
Error_Services('Add', 'No previous run to copy RDS layer parameters from in ':Service:' service.') ErrMsg = 'No previous run to copy RDS layer parameters from in ':Service:' service.'
end end
end else end else
Error_Services('Add', 'RDSNo not supplied in ':Service:' service.') ErrMsg = 'RDSNo not supplied in ':Service:' service.'
end end
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -2446,21 +2449,3 @@ ClearCursors:
Next counter Next counter
return return

View File

@ -3768,7 +3768,7 @@ Service GetReactorAvailChamberCount(ReactNo)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'GetReactorAvailChamberCount' MetricName = 'GetReactorAvailChamberCount'
ErrMsg = 'Error in ReactorServices -> GetReactorAvailChamberCount: ' ErrMsg = ''
AvailableChamberCount = 0 AvailableChamberCount = 0
If ReactNo NE '' then If ReactNo NE '' then
If RowExists('REACTOR', ReactNo) then If RowExists('REACTOR', ReactNo) then
@ -3778,16 +3778,19 @@ Service GetReactorAvailChamberCount(ReactNo)
AvailableChamberCount = ReactorCurrCapacity - ReactorCurrLoadCnt AvailableChamberCount = ReactorCurrCapacity - ReactorCurrLoadCnt
end else end else
ErrMsg := 'Reactor ' : ReactNo : ' does not exist.' ErrMsg := 'Reactor ' : ReactNo : ' does not exist.'
Error_Services('Add', ErrMsg)
end end
end else end else
ErrMsg := 'Reactor Number was null.' ErrMsg := 'Reactor Number was null.'
Error_Services('Add', ErrMsg)
end end
Response = AvailableChamberCount Response = AvailableChamberCount
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then
ErrMsg = 'Error in ReactorServices -> GetReactorAvailChamberCount: ':ErrMsg
Error_Services('Add', ErrMsg)
end
end service end service

View File

@ -263,6 +263,7 @@ API scan.ID.PATCH
SRP_Stopwatch('Start', 'IDPatchResponseTime') SRP_Stopwatch('Start', 'IDPatchResponseTime')
// First confirm that this is a valid Scan ID. // First confirm that this is a valid Scan ID.
jsonScan = Scan_Services('GetScansRow', ScanID, True$) jsonScan = Scan_Services('GetScansRow', ScanID, True$)
ErrMsg = ''
If Error_Services('NoError') then If Error_Services('NoError') then
// Confirm that all required data has been scanned before allowing the "accept" field to be updated. // Confirm that all required data has been scanned before allowing the "accept" field to be updated.
ParseResponse = SRP_JSON(objResource, 'Parse', jsonScan) ParseResponse = SRP_JSON(objResource, 'Parse', jsonScan)
@ -293,7 +294,7 @@ API scan.ID.PATCH
end end
end else end else
ScanNotAcceptableReason = SRP_JSON(objResource, 'GetValue', 'scan.notAcceptableReason') ScanNotAcceptableReason = SRP_JSON(objResource, 'GetValue', 'scan.notAcceptableReason')
Error_Services('Add', ScanNotAcceptableReason) ErrMsg = ScanNotAcceptableReason
end end
SRP_JSON(objResource, 'Release') SRP_JSON(objResource, 'Release')
end else end else
@ -324,6 +325,8 @@ API scan.ID.PATCH
end end
LogData<6> = ResponseStatusCode LogData<6> = ResponseStatusCode
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$) Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end api end api
@ -438,3 +441,4 @@ return

View File

@ -214,19 +214,22 @@ Service GetScansRow(ScanID, ReturnJSON)
ScansRow = '' ScansRow = ''
ErrMsg = ''
If ScanID NE '' then If ScanID NE '' then
ScansRow = Database_Services('ReadDataRow', 'SCANS', ScanID) ScansRow = Database_Services('ReadDataRow', 'SCANS', ScanID)
If ReturnJSON EQ True$ then If ReturnJSON EQ True$ then
ScansRow = Scan_Services('ConvertMVScanToJSON', ScanID, ScansRow) ScansRow = Scan_Services('ConvertMVScanToJSON', ScanID, ScansRow)
end end
end else end else
Error_Services('Add', 'ScanID argument was missing in the ' : Service : ' service.') ErrMsg = 'ScanID argument was missing in the ' : Service : ' service.'
end end
Response = ScansRow Response = ScansRow
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -239,14 +242,17 @@ Service SetScansRow(ScanID, ScansRow)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'SetScansRow' MetricName = 'SetScansRow'
ErrMsg = ''
If (ScanID NE '') AND (ScansRow NE '') then If (ScanID NE '') AND (ScansRow NE '') then
Database_Services('WriteDataRow', 'SCANS', ScanID, ScansRow) Database_Services('WriteDataRow', 'SCANS', ScanID, ScansRow)
end else end else
Error_Services('Add', 'ScanID or ScansRow argument was missing in the ' : Service : ' service.') ErrMsg = 'ScanID or ScansRow argument was missing in the ' : Service : ' service.'
end end
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -262,6 +268,7 @@ Service ProcessScanData(ScanID, ScanJSON)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'ProcessScanData' MetricName = 'ProcessScanData'
ErrMsg = ''
If ( (ScanID NE '') AND (ScanJSON NE '') ) then If ( (ScanID NE '') AND (ScanJSON NE '') ) then
hScanJSON = '' hScanJSON = ''
ParseResponse = SRP_JSON(hScanJSON, 'PARSE', ScanJSON) ParseResponse = SRP_JSON(hScanJSON, 'PARSE', ScanJSON)
@ -300,7 +307,7 @@ Service ProcessScanData(ScanID, ScanJSON)
If RowExists('LOT', LotId) then If RowExists('LOT', LotId) then
TWLots = ScansRow<SCANS.TW_LOT_ID$> TWLots = ScansRow<SCANS.TW_LOT_ID$>
Locate LotId in TWLots using @VM setting twPos then Locate LotId in TWLots using @VM setting twPos then
Error_Services('Add', LotID : ' has already been added as a test wafer lot being used.') ErrMsg = LotID : ' has already been added as a test wafer lot being used.'
end else end else
ScansRow<SCANS.TW_LOT_CHANGED$> = True$ ScansRow<SCANS.TW_LOT_CHANGED$> = True$
LotCurrentOperation = Lot_Services('GetLotCurrOperationName', LotId) LotCurrentOperation = Lot_Services('GetLotCurrOperationName', LotId)
@ -316,14 +323,14 @@ Service ProcessScanData(ScanID, ScanJSON)
ScansRow<SCANS.TW_LOT_QTY$, twPos> = 1 ScansRow<SCANS.TW_LOT_QTY$, twPos> = 1
end end
end else end else
Error_Services('Add', LotID : ' does not have enough wafers to be used.') ErrMsg = LotID : ' does not have enough wafers to be used.'
end end
end else end else
Error_Services('Add', LotID : ' is not at a valid operation for use.') ErrMsg = LotID : ' is not at a valid operation for use.'
end end
end end
end else end else
Error_Services('Add', LotID : ' is not a valid test wafer lot ID.') ErrMsg = LotID : ' is not a valid test wafer lot ID.'
end end
Case Otherwise$ Case Otherwise$
@ -350,9 +357,9 @@ Service ProcessScanData(ScanID, ScanJSON)
Case EmployeeAuthorized NE True$ Case EmployeeAuthorized NE True$
// Regardless of the not authorized reason, the scan data will be considered invalid. // Regardless of the not authorized reason, the scan data will be considered invalid.
EmployeeNotAuthorizedReason = {EMPLOYEE_NOT_AUTHORIZED_REASON} EmployeeNotAuthorizedReason = {EMPLOYEE_NOT_AUTHORIZED_REASON}
Error_Services('Add', EmployeeNotAuthorizedReason) ErrMsg = EmployeeNotAuthorizedReason
Case EmployeeActive NE True$ Case EmployeeActive NE True$
Error_Services('Add', 'Inactive employee.') ErrMsg = 'Inactive employee.'
Case Otherwise$ Case Otherwise$
ScansRow<SCANS.EMPLOYEE_ID$> = {EMPLOYEE_ID} ScansRow<SCANS.EMPLOYEE_ID$> = {EMPLOYEE_ID}
@ -395,7 +402,7 @@ Service ProcessScanData(ScanID, ScanJSON)
If (EmployeeAuthorized NE True$) AND ({EMPLOYEE_ID} NE '') then If (EmployeeAuthorized NE True$) AND ({EMPLOYEE_ID} NE '') then
// Regardless of the not authorized reason, the scan data will be considered invalid. // Regardless of the not authorized reason, the scan data will be considered invalid.
EmployeeNotAuthorizedReason = {EMPLOYEE_NOT_AUTHORIZED_REASON} EmployeeNotAuthorizedReason = {EMPLOYEE_NOT_AUTHORIZED_REASON}
Error_Services('Add', EmployeeNotAuthorizedReason) ErrMsg = EmployeeNotAuthorizedReason
end else end else
* If LoadLock EQ '' then LoadLock = 'NA' ; // NA means Not Applicable. * If LoadLock EQ '' then LoadLock = 'NA' ; // NA means Not Applicable.
ReactorID = ToolID[2, 999] ReactorID = ToolID[2, 999]
@ -415,10 +422,10 @@ Service ProcessScanData(ScanID, ScanJSON)
ScansRow<SCANS.TOOL_ID$> = ToolID ScansRow<SCANS.TOOL_ID$> = ToolID
ScansRow<SCANS.LOAD_LOCK$> = LoadLock ScansRow<SCANS.LOAD_LOCK$> = LoadLock
end else end else
Error_Services('Add', 'Invalid load lock value "':LoadLock:'".') ErrMsg = 'Invalid load lock value "':LoadLock:'".'
end end
end else end else
Error_Services('Add', 'A load lock side "L" or "R" is required for reactor ':ReactorID:'.') ErrMsg = 'A load lock side "L" or "R" is required for reactor ':ReactorID:'.'
end end
Case (LoadLockReq EQ False$) Case (LoadLockReq EQ False$)
If ScansRow<SCANS.LOCATION_ID$> NE '' then If ScansRow<SCANS.LOCATION_ID$> NE '' then
@ -433,17 +440,17 @@ Service ProcessScanData(ScanID, ScanJSON)
end end
Case ToolType _EQC 'Transfer' Case ToolType _EQC 'Transfer'
Error_Services('Add', 'Tool type ':ToolType:' is not currently supported by the barcode application.') ErrMsg = 'Tool type ':ToolType:' is not currently supported by the barcode application.'
// Code below may be implemented down the road. // Code below may be implemented down the road.
// This is a transfer tool. Just update the scan resource. // This is a transfer tool. Just update the scan resource.
* ScansRow<SCANS.LOCATION_ID$> = '' ; // Make sure the Location ID is cleared. * ScansRow<SCANS.LOCATION_ID$> = '' ; // Make sure the Location ID is cleared.
* ScansRow<SCANS.CASSETTE_IDS$> = ScansRow<SCANS.CASSETTE_IDS$, 1> ; // Make sure only the first Cassette ID is tracked. * ScansRow<SCANS.CASSETTE_IDS$> = ScansRow<SCANS.CASSETTE_IDS$, 1> ; // Make sure only the first Cassette ID is tracked.
* ScansRow<SCANS.TRANSFER_TOOL_ID$> = ToolID * ScansRow<SCANS.TRANSFER_TOOL_ID$> = ToolID
Case Otherwise$ Case Otherwise$
Error_Services('Add', 'Tool type ':ToolType:' is not currently supported by the barcode application.') ErrMsg = 'Tool type ':ToolType:' is not currently supported by the barcode application.'
End Case End Case
end else end else
Error_Services('Add', ToolID : ' is not a valid tool ID.') ErrMsg = ToolID : ' is not a valid tool ID.'
end end
Case ScanData[1, 2] EQ '1L' Case ScanData[1, 2] EQ '1L'
@ -461,7 +468,7 @@ Service ProcessScanData(ScanID, ScanJSON)
ScansRow<SCANS.TRANSFER_TOOL_ID$> = '' ; // Make sure the Transfer Tool ID is cleared. ScansRow<SCANS.TRANSFER_TOOL_ID$> = '' ; // Make sure the Transfer Tool ID is cleared.
ScansRow<SCANS.LOCATION_ID$> = LocationID ScansRow<SCANS.LOCATION_ID$> = LocationID
end else end else
Error_Services('Add', LocationID : ' is not a valid location ID.') ErrMsg = LocationID : ' is not a valid location ID.'
end end
Case ScanData[1, 2] EQ '1B' Case ScanData[1, 2] EQ '1B'
@ -476,7 +483,7 @@ Service ProcessScanData(ScanID, ScanJSON)
ScansRow<SCANS.BOAT_ID$> = BoatID ScansRow<SCANS.BOAT_ID$> = BoatID
ScansRow<SCANS.PL_NUMBER$> = PLNo ScansRow<SCANS.PL_NUMBER$> = PLNo
end else end else
Error_Services('Add', ScanData : ' is not a valid boat ID.') ErrMsg = ScanData : ' is not a valid boat ID.'
end end
Case ScanData[1, 3] EQ 'PWD' Case ScanData[1, 3] EQ 'PWD'
// Password/Signature scan. If the scan is not ready to be accepted or the password does // Password/Signature scan. If the scan is not ready to be accepted or the password does
@ -491,14 +498,14 @@ Service ProcessScanData(ScanID, ScanJSON)
ScansRow<SCANS.AUTHENTICATED$> = 1 ScansRow<SCANS.AUTHENTICATED$> = 1
end else end else
ScansRow<SCANS.AUTHENTICATED$> = 0 ScansRow<SCANS.AUTHENTICATED$> = 0
Error_Services('Add', 'Invalid password for user ':EmployeeID:'.') ErrMsg = 'Invalid password for user ':EmployeeID:'.'
end end
ScansRow<SCANS.EMPLOYEE_CHANGED$> = True$ ScansRow<SCANS.EMPLOYEE_CHANGED$> = True$
end else end else
Error_Services('Add', 'An employee ID must be scanned before scanning a password.') ErrMsg = 'An employee ID must be scanned before scanning a password.'
end end
end else end else
Error_Services('Add', 'Invalid password scanned.') ErrMsg = 'Invalid password scanned.'
end end
Case ScanData[1, 8] EQ 'OVERRIDE' Case ScanData[1, 8] EQ 'OVERRIDE'
@ -565,7 +572,7 @@ Service ProcessScanData(ScanID, ScanJSON)
end end
end else end else
Error_Services('Add', 'Selected Employee is not authorized to perform an override') ErrMsg = 'Selected Employee is not authorized to perform an override'
end end
end end
Case ScanData[1, 2] EQ '5T' Case ScanData[1, 2] EQ '5T'
@ -651,11 +658,11 @@ Service ProcessScanData(ScanID, ScanJSON)
ScansRow<SCANS.CASSETTE_IDS$> = CassetteID ScansRow<SCANS.CASSETTE_IDS$> = CassetteID
end end
end else end else
Error_Services('Add', CassetteID : ' is not a valid Cassette ID.') ErrMsg = CassetteID : ' is not a valid Cassette ID.'
end end
End Case End Case
If Error_Services('NoError') then If ErrMsg EQ '' then
// Process Scan row data here to determine the type of scan (i.e. Location, Pre-Epi + Load, or Unload). // Process Scan row data here to determine the type of scan (i.e. Location, Pre-Epi + Load, or Unload).
ScanType = ScansRow<SCANS.SCAN_TYPE$> ScanType = ScansRow<SCANS.SCAN_TYPE$>
CassetteIDs = ScansRow<SCANS.CASSETTE_IDS$> CassetteIDs = ScansRow<SCANS.CASSETTE_IDS$>
@ -682,7 +689,7 @@ Service ProcessScanData(ScanID, ScanJSON)
LastCassScanned = CassetteIDs<0, NumCass> LastCassScanned = CassetteIDs<0, NumCass>
CurrStage = Xlate('RDS', LastCassScanned, 'CURR_STAGE', 'X') CurrStage = Xlate('RDS', LastCassScanned, 'CURR_STAGE', 'X')
If CurrStage EQ 'UNLOAD' then If CurrStage EQ 'UNLOAD' then
Error_Services('Add', '(':LastCassScanned:') Cassette is currently loaded on a tool and is ineligble for a location scan.') ErrMsg = '(':LastCassScanned:') Cassette is currently loaded on a tool and is ineligble for a location scan.'
end end
Case ScanType EQ 'TOOL' Case ScanType EQ 'TOOL'
@ -756,7 +763,9 @@ Service ProcessScanData(ScanID, ScanJSON)
CassNo = Xlate('RDS', CassetteID, 'CASS_NO', 'X') CassNo = Xlate('RDS', CassetteID, 'CASS_NO', 'X')
WOMatKey = WONo:'*':CassNo WOMatKey = WONo:'*':CassNo
WOMatLocs = Xlate('WO_MAT', WOMatKey, WO_MAT_INV_LOCATION$, 'X') WOMatLocs = Xlate('WO_MAT', WOMatKey, WO_MAT_INV_LOCATION$, 'X')
If Index(WOMatLocs,'PTI',1) else Error_Services('Add', 'Cassette ':CassetteID:' failed due to missing PTI.') If Index(WOMatLocs,'PTI',1) else
ErrMsg = 'Cassette ':CassetteID:' failed due to missing PTI.'
end
end else end else
// EpiPro RDS // EpiPro RDS
OutCassNos = Xlate('RDS', CassetteID, 'OUT_CASS_NO', 'X') OutCassNos = Xlate('RDS', CassetteID, 'OUT_CASS_NO', 'X')
@ -766,11 +775,13 @@ Service ProcessScanData(ScanID, ScanJSON)
CassNo = OutCassNo CassNo = OutCassNo
WOMatKey = WONo:'*':CassNo WOMatKey = WONo:'*':CassNo
WOMatLocs = Xlate('WO_MAT', WOMatKey, WO_MAT_INV_LOCATION$, 'X') WOMatLocs = Xlate('WO_MAT', WOMatKey, WO_MAT_INV_LOCATION$, 'X')
If Index(WOMatLocs,'PTI',1) else Error_Services('Add', 'Cassette ':CassetteID:' failed due to missing PTI.') If Index(WOMatLocs,'PTI',1) else
ErrMsg = 'Cassette ':CassetteID:' failed due to missing PTI.'
end
Next OutCassNo Next OutCassNo
end end
If Error_Services('NoError') then If ErrMsg EQ '' then
If CurrStatus NE 'HOLD' then If CurrStatus NE 'HOLD' then
If (EmployeeID NE '') then If (EmployeeID NE '') then
* SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X') * SupplInstAckReq = Xlate('RDS', RDSNo, 'SUPPL_ACK_REQ' , 'X')
@ -1033,17 +1044,17 @@ Service ProcessScanData(ScanID, ScanJSON)
end end
end else end else
ScansRow<SCANS.SUPPLIER_LOT$> = '' ScansRow<SCANS.SUPPLIER_LOT$> = ''
Error_Services('Add', '(':CassetteID:') Supplier lot mismatch.') ErrMsg = '(':CassetteID:') Supplier lot mismatch.'
end end
end else end else
Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.')
end end
end else end else
Error_Services('Add', '(':CassetteID:') The first run must be completed using the OpenInsight user interface.') ErrMsg = '(':CassetteID:') The first run must be completed using the OpenInsight user interface.'
end end
end else end else
Error_Services('Add', '(':CassetteID:') A pre-clean is required for this RDS. The OpenInsight user interface must be used to proceed.') ErrMsg = '(':CassetteID:') A pre-clean is required for this RDS. The OpenInsight user interface must be used to proceed.'
end end
Case CurrStage _EQC 'LOAD' Case CurrStage _EQC 'LOAD'
Action = 'LOAD' Action = 'LOAD'
@ -1103,7 +1114,7 @@ Service ProcessScanData(ScanID, ScanJSON)
Scan_Services('AddNotAcceptableReason', ErrorMessage) Scan_Services('AddNotAcceptableReason', ErrorMessage)
end end
end else end else
Error_Services('Add', 'Scanned tool ':ScanTool:' does not match the scheduled tool ':SchedTool:'. (':RDSNo:')') ErrMsg = 'Scanned tool ':ScanTool:' does not match the scheduled tool ':SchedTool:'. (':RDSNo:')'
end end
end else end else
Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.') Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.')
@ -1111,7 +1122,7 @@ Service ProcessScanData(ScanID, ScanJSON)
end else end else
ScansRow<SCANS.SUPPLIER_LOT$> = '' ScansRow<SCANS.SUPPLIER_LOT$> = ''
Error_Services('Add', '(':CassetteID:') Supplier lot mismatch.') ErrMsg = '(':CassetteID:') Supplier lot mismatch.'
end end
end else end else
Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.')
@ -1195,12 +1206,10 @@ Service ProcessScanData(ScanID, ScanJSON)
end end
end end
end else end else
ErrorMessage = 'WO_MAT record was null.' ErrMsg = 'WO_MAT record was null.'
Error_Services('Add', ErrorMessage)
end end
end else end else
ErrorMessage = 'Failure to read cassette record. ' : Error_Services('GetMessage') ErrMsg = 'Failure to read cassette record. ' : Error_Services('GetMessage')
Error_Services('Add', ErrorMessage)
end end
end end
end end
@ -1218,24 +1227,23 @@ Service ProcessScanData(ScanID, ScanJSON)
end end
Case CurrStage _EQC 'COMP' Case CurrStage _EQC 'COMP'
Action = 'COMP' Action = 'COMP'
Error_Services('Add', '(':CassetteID:") Cassette has already been FQA'd.") ErrMsg = '(':CassetteID:") Cassette has already been FQA'd."
Case Otherwise$ Case Otherwise$
Action = CurrStage Action = CurrStage
Error_Services('Set', '(':CassetteID:') The ':CurrStage:' is not currently supported by the barcode application.') ErrMsg = '(':CassetteID:') The ':CurrStage:' is not currently supported by the barcode application.'
End Case End Case
end else end else
Scan_Services('AddNotAcceptableReason', 'EmployeeID required to complete a tool scan.') Scan_Services('AddNotAcceptableReason', 'EmployeeID required to complete a tool scan.')
end end
end else end else
Error_Services('Add', '(':CassetteID:') Process Error: cassette is on Hold and may not be signed off.') ErrMsg = '(':CassetteID:') Process Error: cassette is on Hold and may not be signed off.'
end end
end end
end else end else
Error_Services('Add', '(':CassetteID:') WMI/WMO cassette are not currently supported for tool scans. The OpenInsight user interface must be used in order to proceed.') ErrMsg = '(':CassetteID:') WMI/WMO cassette are not currently supported for tool scans. The OpenInsight user interface must be used in order to proceed.'
end end
end else end else
// Currently we are only supporting loading one cassette onto a tool at a time. ErrMsg = '(':CassetteID:') Only one cassette can be loaded onto a tool at a time.'
Error_Services('Add', '(':CassetteID:') Only one cassette can be loaded onto a tool at a time.')
end end
end end
@ -1296,7 +1304,7 @@ Service ProcessScanData(ScanID, ScanJSON)
End Case End Case
end end
// If the the scan data is valid, update the scan log before returning to the calling process. // If the the scan data is valid, update the scan log before returning to the calling process.
If Error_Services('NoError') then If ErrMsg EQ '' then
If Scan_Services('NoNotAcceptableReason') then If Scan_Services('NoNotAcceptableReason') then
ScansRow<SCANS.ACCEPTABLE$> = True$ ScansRow<SCANS.ACCEPTABLE$> = True$
ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = '' ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = ''
@ -1306,7 +1314,7 @@ Service ProcessScanData(ScanID, ScanJSON)
end end
end else end else
ScansRow<SCANS.ACCEPTABLE$> = False$ ScansRow<SCANS.ACCEPTABLE$> = False$
ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = Error_Services('GetMessage') ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = ErrMsg
end end
If ScanData NE '' then If ScanData NE '' then
ScansRow<SCANS.SCANNED_DATES$, -1> = Date() ScansRow<SCANS.SCANNED_DATES$, -1> = Date()
@ -1314,25 +1322,21 @@ Service ProcessScanData(ScanID, ScanJSON)
ScansRow<SCANS.SCANNED_DATA$, -1> = ScanData ScansRow<SCANS.SCANNED_DATA$, -1> = ScanData
end end
ScansRow<SCANS.ACTION$> = Action ScansRow<SCANS.ACTION$> = Action
// Save error message if present as Database_Services will clear any errors.
ErrorMessage = '' Database_Services('WriteDataRow', 'SCANS', ScanID, ScansRow, True$, False$, True$)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
Database_Services('WriteDataRow', 'SCANS', ScanID, ScansRow, True$, False$, True$)
// Restore pre-existing error message if present.
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
end end
end else end else
Error_Services('Add', 'Unable to parse the JSON scan data in the ':Service:' service.') ErrMsg = 'Unable to parse the JSON scan data in the ':Service:' service.'
end end
SRP_JSON(hScanJSON, 'Release') SRP_JSON(hScanJSON, 'Release')
end else end else
Error_Services('Add', 'ScanID or ScanJSON argument was missing in the ' : Service : ' service.') ErrMsg = 'ScanID or ScanJSON argument was missing in the ' : Service : ' service.'
end end
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -1344,6 +1348,7 @@ Service AcceptScan(ScanID, ScanJSON)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'AcceptScan' MetricName = 'AcceptScan'
ErrMsg = ''
If ( (ScanID NE '') and (ScanJSON NE '') ) then If ( (ScanID NE '') and (ScanJSON NE '') ) then
hBody = '' hBody = ''
ParseResponse = SRP_JSON(hBody, 'PARSE', ScanJSON) ParseResponse = SRP_JSON(hBody, 'PARSE', ScanJSON)
@ -1376,7 +1381,7 @@ Service AcceptScan(ScanID, ScanJSON)
If Error_Services('NoError') AND SendStatus EQ 'Success' then If Error_Services('NoError') AND SendStatus EQ 'Success' then
Result = 'Tencor Data Sent Successfully' Result = 'Tencor Data Sent Successfully'
end else end else
Error_Services('Add', SendStatus) ErrMsg = SendStatus
end end
Case ScanType _EQC 'LOCATION' Case ScanType _EQC 'LOCATION'
@ -1481,8 +1486,7 @@ Service AcceptScan(ScanID, ScanJSON)
end end
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
ErrorMsg = 'Error calling obj_WO_Mat_Log("Create"). Error code: ':errCode ErrMsg = 'Error calling obj_WO_Mat_Log("Create"). Error code: ':errCode
Error_Services('Add', ErrorMsg)
END else END else
NumCass = DCount(CassetteIDs, @VM) NumCass = DCount(CassetteIDs, @VM)
If NumCass EQ 1 then If NumCass EQ 1 then
@ -1545,8 +1549,7 @@ Service AcceptScan(ScanID, ScanJSON)
If Error_Services('NoError') then If Error_Services('NoError') then
Continue = True$ Continue = True$
end else end else
ErrorMessage = Error_Services('GetMessage') ErrMsg = Error_Services('GetMessage')
Error_Services('Set', ErrorMessage)
Continue = False$ Continue = False$
end end
If Continue then If Continue then
@ -1590,8 +1593,7 @@ Service AcceptScan(ScanID, ScanJSON)
If Error_Services('NoError') then If Error_Services('NoError') then
Continue = True$ Continue = True$
end else end else
ErrorMessage = Error_Services('GetMessage') ErrMsg = Error_Services('GetMessage')
Error_Services('Set', ErrorMessage)
Continue = False$ Continue = False$
end end
If Continue then If Continue then
@ -1627,8 +1629,7 @@ Service AcceptScan(ScanID, ScanJSON)
PSNo = Xlate('RDS', RDSNo, RDS_PROD_SPEC_ID$, True$, 'X') PSNo = Xlate('RDS', RDSNo, RDS_PROD_SPEC_ID$, True$, 'X')
NewTestRunId = Test_Run_Services('CreateTestRunRecord', TestRunType, 'R', Reactor, PSNo, RDSNo,Username , TestWaferLots, TestWaferLotQtys) NewTestRunId = Test_Run_Services('CreateTestRunRecord', TestRunType, 'R', Reactor, PSNo, RDSNo,Username , TestWaferLots, TestWaferLotQtys)
If Error_Services('HasError') then If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage') ErrMsg = Error_Services('GetMessage')
Error_Services('Set', ErrorMessage)
Continue = False$ Continue = False$
end end
end end
@ -1645,10 +1646,10 @@ Service AcceptScan(ScanID, ScanJSON)
end end
Case CurrStage _EQC 'COMP' Case CurrStage _EQC 'COMP'
Action = 'COMP' Action = 'COMP'
Error_Services('Set', '(':CassetteID:") Cassette has already been FQA'd.") ErrMsg = '(':CassetteID:") Cassette has already been FQA'd."
Case Otherwise$ Case Otherwise$
Action = CurrStage Action = CurrStage
Error_Services('Set', '(':CassetteID:') The ':CurrStage:' is not currently supported by the barcode application.') ErrMsg = '(':CassetteID:') The ':CurrStage:' is not currently supported by the barcode application.'
End Case End Case
Case CassetteID EQ '' AND TestWaferLots NE '' Case CassetteID EQ '' AND TestWaferLots NE ''
//Tool scan with ONLY test wafers being logged. //Tool scan with ONLY test wafers being logged.
@ -1661,12 +1662,10 @@ Service AcceptScan(ScanID, ScanJSON)
If NewTestRunId NE '' then If NewTestRunId NE '' then
Result = 'Test run logged successfully' Result = 'Test run logged successfully'
end else end else
ErrorMessage = 'Error while logging creating test run.' ErrMsg = 'Error while logging creating test run.'
Error_Services('Set', ErrorMessage)
end end
end else end else
ErrorMessage = Error_Services('GetMessage') ErrMsg = Error_Services('GetMessage')
Error_Services('Set', ErrorMessage)
end end
Case Otherwise$ Case Otherwise$
//null //null
@ -1674,34 +1673,30 @@ Service AcceptScan(ScanID, ScanJSON)
End Case End Case
end end
If Error_Services('NoError') then If ErrMsg EQ '' then
ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = 'This scan has already been accepted.' ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = 'This scan has already been accepted.'
end else end else
ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = Error_Services('GetMessage') ScansRow<SCANS.NOT_ACCEPTABLE_REASON$> = ErrMsg
end end
ScansRow<SCANS.ACCEPTABLE$> = False$ ScansRow<SCANS.ACCEPTABLE$> = False$
If Assigned(Result) then ScansRow<SCANS.RESULT$> = Result If Assigned(Result) then ScansRow<SCANS.RESULT$> = Result
// Save error message if present as Database_Services will clear any errors.
ErrorMessage = '' Scan_Services('SetScansRow', ScanID, ScansRow)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
Scan_Services('SetScansRow', ScanID, ScansRow)
// Restore pre-existing error message if present.
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
end else end else
Error_Services('Add', 'The accepted.status field is missing from the JSON object in the ':Service:' service.') ErrMsg = 'The accepted.status field is missing from the JSON object in the ':Service:' service.'
end end
SRP_JSON(hBody, 'Release') SRP_JSON(hBody, 'Release')
end else end else
Error_Services('Add', 'Unable to parse the JSON scan resource in the ':Service:' service.') ErrMsg = 'Unable to parse the JSON scan resource in the ':Service:' service.'
end end
end else end else
Error_Services('Add', 'ScanID or ScanJSON argument was missing in the ' : Service : ' service.') ErrMsg = 'ScanID or ScanJSON argument was missing in the ' : Service : ' service.'
end end
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -1719,6 +1714,7 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL)
mvScanChanged = False$ mvScanChanged = False$
ErrMsg = ''
If ScanID NE '' then If ScanID NE '' then
If mvScan EQ '' then mvScan = Database_Services('ReadDataRow', 'SCANS', ScanID) If mvScan EQ '' then mvScan = Database_Services('ReadDataRow', 'SCANS', ScanID)
@ -2172,17 +2168,19 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL)
Database_Services('WriteDataRow', 'SCANS', {SCAN_ID}, mvScan, True$, False$, False$) Database_Services('WriteDataRow', 'SCANS', {SCAN_ID}, mvScan, True$, False$, False$)
end end
end else end else
Error_Services('Add', 'Unable to create JSON representation in the ' : Service : ' service.') ErrMsg = 'Unable to create JSON representation in the ' : Service : ' service.'
end end
end end
end else end else
Error_Services('Add', 'ScanID argument was missing in the ' : Service : ' service.') ErrMsg = 'ScanID argument was missing in the ' : Service : ' service.'
end end
Response = jsonScan Response = jsonScan
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -2421,3 +2419,5 @@ return

View File

@ -805,9 +805,9 @@ end service
Service GetCurrentEvent(ReactNo) Service GetCurrentEvent(ReactNo)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'GetCurrentEvent' MetricName = 'GetCurrentEvent'
ErrorMsg = ''
SchedDetKey = '' SchedDetKey = ''
ErrorMsg = ''
If ReactNo NE '' then If ReactNo NE '' then
CurrDTM = Datetime() CurrDTM = Datetime()
Query = 'SELECT SCHED_DET_NG WITH REACT_NO EQ "':ReactNo:'" AND WITH EVENT_COMP NE 1 BY START_DTM' Query = 'SELECT SCHED_DET_NG WITH REACT_NO EQ "':ReactNo:'" AND WITH EVENT_COMP NE 1 BY START_DTM'
@ -819,7 +819,7 @@ Service GetCurrentEvent(ReactNo)
ReadNext SchedDetKey else EOF = True$ ReadNext SchedDetKey else EOF = True$
Response = SchedDetKey Response = SchedDetKey
end else end else
ErrorMsg = 'Error in service ':Service:' module. Error code ':errCode ErrorMsg = 'Error in service ':Service:' module. Error code ':errCode
end end
GoSub ClearCursors GoSub ClearCursors
end end
@ -827,17 +827,14 @@ Service GetCurrentEvent(ReactNo)
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrorMsg NE '' then If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
Error_Services('Add', ErrorMsg)
end
end service end service
Service CurrentEventIsBlock(ReactNo) Service CurrentEventIsBlock(ReactNo)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'CurrentEventIsBlock' MetricName = 'CurrentEventIsBlock'
ErrorMsg = ''
ErrorMsg = ''
If ReactNo NE '' then If ReactNo NE '' then
CurrentSchedDetKey = Schedule_Services('GetCurrentEvent', ReactNo) CurrentSchedDetKey = Schedule_Services('GetCurrentEvent', ReactNo)
@ -861,18 +858,15 @@ Service CurrentEventIsBlock(ReactNo)
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrorMsg NE '' then If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
Error_Services('Add', ErrorMsg)
end
end service end service
Service GetNextEvent(ReactNo) Service GetNextEvent(ReactNo)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'GetNextEvent' MetricName = 'GetNextEvent'
ErrorMsg = ''
SchedDetKey = '' SchedDetKey = ''
ErrorMsg = ''
If ReactNo NE '' then If ReactNo NE '' then
CurrDTM = Datetime() CurrDTM = Datetime()
Query = 'SELECT SCHED_DET_NG WITH REACT_NO EQ "':ReactNo:'" AND WITH EVENT_COMP NE 1 BY START_DTM' Query = 'SELECT SCHED_DET_NG WITH REACT_NO EQ "':ReactNo:'" AND WITH EVENT_COMP NE 1 BY START_DTM'
@ -894,7 +888,7 @@ Service GetNextEvent(ReactNo)
end end
end end
end else end else
ErrorMsg = 'Error in service ':Service:' module. Error code ':errCode ErrorMsg = 'Error in service ':Service:' module. Error code ':errCode
end end
GoSub ClearCursors GoSub ClearCursors
end end
@ -902,10 +896,7 @@ Service GetNextEvent(ReactNo)
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrorMsg NE '' then If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
Error_Services('Add', ErrorMsg)
end
end service end service
Service GetEngagedEvent(ReactNo) Service GetEngagedEvent(ReactNo)
@ -957,9 +948,9 @@ end service
Service NextEventIsSamePsn(ReactNo) Service NextEventIsSamePsn(ReactNo)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'NextEventIsSamePsn' MetricName = 'NextEventIsSamePsn'
ErrorMsg = ''
Response = False$ Response = False$
ErrorMsg = ''
If ReactNo NE '' then If ReactNo NE '' then
CurrentSchedDetKey = Schedule_Services('GetCurrentEvent', ReactNo) CurrentSchedDetKey = Schedule_Services('GetCurrentEvent', ReactNo)
@ -1005,17 +996,14 @@ Service NextEventIsSamePsn(ReactNo)
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrorMsg NE '' then If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
Error_Services('Add', ErrorMsg)
end
end service end service
Service NextEventIsBlock(ReactNo) Service NextEventIsBlock(ReactNo)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'NextEventIsBlock' MetricName = 'NextEventIsBlock'
ErrorMsg = ''
ErrorMsg = ''
If ReactNo NE '' then If ReactNo NE '' then
NextSchedDetKey = Schedule_Services('GetNextEvent', ReactNo) NextSchedDetKey = Schedule_Services('GetNextEvent', ReactNo)
@ -1039,10 +1027,7 @@ Service NextEventIsBlock(ReactNo)
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrorMsg NE '' then If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
Error_Services('Add', ErrorMsg)
end
end service end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------

View File

@ -456,6 +456,7 @@ Service AcknowledgeSupplement(SupplID, EntryUser)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'AcknowledgeSupplement' MetricName = 'AcknowledgeSupplement'
ErrMsg = ''
If ( (SupplID NE '') and (EntryUser NE '') ) then If ( (SupplID NE '') and (EntryUser NE '') ) then
OldRec = Xlate('SUPPLEMENTS', SupplID, '', 'X', '') OldRec = Xlate('SUPPLEMENTS', SupplID, '', 'X', '')
If OldRec NE '' then If OldRec NE '' then
@ -469,19 +470,21 @@ Service AcknowledgeSupplement(SupplID, EntryUser)
Supplement_Services('LogSupplementChange', NewRec, 'Acknowledged', EntryUser) Supplement_Services('LogSupplementChange', NewRec, 'Acknowledged', EntryUser)
end else end else
Response = FALSE$ Response = FALSE$
Error_Services('Add', 'Error editing Supplement record.') ErrMsg = 'Error editing Supplement record.'
end end
end else end else
Response = FALSE$ Response = FALSE$
Error_Services('Add', 'Record does not exist.') ErrMsg = 'Record does not exist.'
end end
end else end else
Response = FALSE$ Response = FALSE$
Error_Services('Add', 'SupplID or EntryUser was missing in the ' : Service : ' service.') ErrMsg = 'SupplID or EntryUser was missing in the ' : Service : ' service.'
end end
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -501,6 +504,7 @@ Service UnacknowledgedSupplementCheck(LotType=LOTTYPES, LotID, Stage=STAGES)
UnackList = '' UnackList = ''
Response = False$ Response = False$
ErrMsg = ''
If ( (LotType NE '') and (LotID NE '') and (Stage NE '') ) then If ( (LotType NE '') and (LotID NE '') and (Stage NE '') ) then
KeyList = '' KeyList = ''
Query = '' Query = ''
@ -518,23 +522,25 @@ Service UnacknowledgedSupplementCheck(LotType=LOTTYPES, LotID, Stage=STAGES)
If AckField NE True$ then UnackList<-1> = Key If AckField NE True$ then UnackList<-1> = Key
Next Key Next Key
end else end else
Error_Services('Add', 'Error in ':Service:' service. Error opening SUPPLEMENTS table.') ErrMsg = 'Error in ':Service:' service. Error opening SUPPLEMENTS table.'
end end
end end
end else end else
Error_Services('Add', 'Error in ':Service:' service. Error calling Btree.Extract') ErrMsg = 'Error in ':Service:' service. Error calling Btree.Extract'
end end
end else end else
Error_Services('Add', 'Error in ':Service:' service. Error opening SUPPLEMENTS dictionary.') ErrMsg = 'Error in ':Service:' service. Error opening SUPPLEMENTS dictionary.'
end end
end else end else
Error_Services('Add', 'LotType, LotID, or Stage was missing in the ' : Service : ' service.') ErrMsg = 'LotType, LotID, or Stage was missing in the ' : Service : ' service.'
end end
If UnackList NE '' then Response = UnackList If UnackList NE '' then Response = UnackList
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -552,6 +558,7 @@ Service LogSupplementChange(SupplementRec, EditEvent, EntryUser)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'LogSupplementChange' MetricName = 'LogSupplementChange'
ErrMsg = ''
If ( (SupplementRec NE '') and (EditEvent NE '') and (EntryUser NE '') ) then If ( (SupplementRec NE '') and (EditEvent NE '') and (EntryUser NE '') ) then
SupplementText = SupplementRec<SUPPLEMENTS_SUPPL_TEXT$> SupplementText = SupplementRec<SUPPLEMENTS_SUPPL_TEXT$>
LotType = SupplementRec<SUPPLEMENTS_LOT_TYPE$> LotType = SupplementRec<SUPPLEMENTS_LOT_TYPE$>
@ -565,11 +572,13 @@ Service LogSupplementChange(SupplementRec, EditEvent, EntryUser)
End Case End Case
end else end else
Error_Services('Add', 'LotType, LotID, or Stage was missing in the ' : Service : ' service.') ErrMsg = 'LotType, LotID, or Stage was missing in the ' : Service : ' service.'
end end
EndTick = GetTickCount() EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -670,3 +679,4 @@ Service SendNotifications(RDSList, EditEvent, Instructions, EntryUser)
end service end service

View File

@ -447,37 +447,43 @@ Service CassetteIsLastInWo(WoMatKey)
IsLastInWo = False$ IsLastInWo = False$
ErrMsg = ''
If Unassigned(WoMatKey) or WoMatKey EQ '' or RowExists('WO_MAT', WoMatKey) NE True$ then If Unassigned(WoMatKey) or WoMatKey EQ '' or RowExists('WO_MAT', WoMatKey) NE True$ then
Error_Services('Add', 'invalid WO_MAT key') ErrMsg = 'invalid WO_MAT key'
end end
WO = Field(WoMatKey, '*', 1) WO = Field(WoMatKey, '*', 1)
If WO EQ '' then If WO EQ '' then
Error_Services('Add', 'WO# not found in WO_MAT record') ErrMsg = 'WO# not found in WO_MAT record'
end end
If Error_Services('NoError') and Num(WO) EQ False$ then If ErrMsg EQ '' and Num(WO) EQ False$ then
Error_Services('Add', 'WO# is not numeric') ErrMsg = 'WO# is not numeric'
end end
CassNo = Field(WoMatKey, '*', 2) CassNo = Field(WoMatKey, '*', 2)
If Error_Services('NoError') and CassNo EQ '' then If ErrMsg EQ '' and CassNo EQ '' then
Error_Services('Add', 'Cassette# not found in WO_MAT record') ErrMsg = 'Cassette# not found in WO_MAT record'
end end
If Error_Services('NoError') and Num(CassNo) EQ False$ then If ErrMsg EQ '' and Num(CassNo) EQ False$ then
Error_Services('Add', 'Cassette# is not numeric') ErrMsg = 'Cassette# is not numeric'
end end
If Error_Services('NoError') then If ErrMsg EQ '' then
WoMatKeys = Xlate('WO_LOG', WO, WO_LOG_WO_MAT_KEY$, 'X') WoMatKeys = Xlate('WO_LOG', WO, WO_LOG_WO_MAT_KEY$, 'X')
If Error_Services('NoError') and WoMatKeys NE '' then If WoMatKeys NE '' then
TotalCassettes = DCount(WoMatKeys, @VM) TotalCassettes = DCount(WoMatKeys, @VM)
IsLastInWo = TotalCassettes EQ CassNo IsLastInWo = TotalCassettes EQ CassNo
end else
ErrMsg = 'WO_MAT keys not found in WO_LOG for WO ':WO
end end
end end
If Error_Services('HasError') then Response = IsLastInWo
ErrMsg = Error_Services('GetMessage')
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrMsg NE '' then
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = LoggingDtm
LogData<2> = WOMatKey LogData<2> = WOMatKey
@ -488,11 +494,6 @@ Service CassetteIsLastInWo(WoMatKey)
Error_Services('Add', ErrMsg) Error_Services('Add', ErrMsg)
end end
Response = IsLastInWo
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
end service end service
@ -697,3 +698,4 @@ Service VerifyWOLogWOMatKeyColumn(WOMatKey)
end service end service