created transaction queue to process database writes and deletes in first in first out order
This commit is contained in:
@ -115,7 +115,7 @@ AutoDisplayErrors = FALSE$ ; // Set this to True$ when debugging so all erro
|
||||
Declare subroutine SRP_Stopwatch, Error_Services, obj_Tables, Metrology_Services, obj_RDS_Test, SRP_JSON, Logging_Services
|
||||
Declare subroutine RTI_Set_Debugger, Database_Services, Btree.Extract, Extract_SI_Keys, Obj_WO_Mat, Obj_WO_Mat_Log
|
||||
Declare subroutine Dialog_Box, Obj_Notes, RList, Set_Status, Errmsg, Obj_React_Status , Reactor_Services
|
||||
Declare subroutine Rds_Services, Obj_Post_Log, Mona_Services
|
||||
Declare subroutine Rds_Services, Obj_Post_Log, Mona_Services, Transaction_Services
|
||||
Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_Point_Map, Database_Services
|
||||
Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Error_Services
|
||||
Declare function Memberof, Obj_WO_Mat, Obj_WO_Mat_Log, SRP_Array, DateTime, Dialog_Box, obj_Prod_Spec
|
||||
@ -144,15 +144,12 @@ end
|
||||
|
||||
Return Response else ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Service Parameter Options
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Options BOOLEAN = True$, False$
|
||||
Options STAGES = 'PRE', 'FWI', 'LWI', 'QA', 'LOAD', 'UNLOAD'
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Services
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -198,6 +195,7 @@ Service GetCurrentStage(RDSNo)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetComments
|
||||
//
|
||||
@ -233,6 +231,7 @@ End Service
|
||||
// to an RDS record.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service AddComment(RDSNo, Comment, UsernameOpt)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'AddComment'
|
||||
|
||||
@ -259,6 +258,7 @@ Service AddComment(RDSNo, Comment, UsernameOpt)
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
@ -297,10 +297,10 @@ Service GetFinalQAStatus(RDSNo)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
Service IsPackaged(RDSNo, RDSType)
|
||||
|
||||
isPackaged = False$
|
||||
//ReactType = XLATE('RDS', RDSNo, 'REACTOR_TYPE', '')
|
||||
// Check to see if the Final QA signature is in place.
|
||||
If RDSType EQ 'EPP' then
|
||||
Convert '.' TO '*' in RDSNo
|
||||
@ -323,7 +323,9 @@ Service IsPackaged(RDSNo, RDSType)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
Service GetHoldStatus(RDSNo, RDSType)
|
||||
|
||||
Response = False$
|
||||
If Error_Services('NoError') then
|
||||
IF RDSType EQ 'EPP' then
|
||||
@ -362,8 +364,7 @@ End Service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetRDSList(WorkOrderNo, KeysOnly=BOOLEAN)
|
||||
|
||||
RDSList = ''
|
||||
|
||||
RDSList = ''
|
||||
If WorkOrderNo NE '' then
|
||||
rv = Set_Status(0)
|
||||
RDSKeys = ''
|
||||
@ -413,8 +414,7 @@ Service GetRDSList(WorkOrderNo, KeysOnly=BOOLEAN)
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'WorkOrderNo argument was missing from the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
end
|
||||
Response = RDSList
|
||||
|
||||
end service
|
||||
@ -432,7 +432,6 @@ end service
|
||||
Service GetRDSData(WorkOrderNo, Columns, ShowGasGauge, RDSOverrideList)
|
||||
|
||||
RDSList = ''
|
||||
|
||||
If ( (WorkOrderNo NE '') or (RDSOverrideList NE '') ) then
|
||||
If ShowGasGauge NE True$ then ShowGasGauge = False$
|
||||
rv = Set_Status(0)
|
||||
@ -523,6 +522,7 @@ end service
|
||||
// <1,2> Column Text Supplement Instructions
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service SetSupplement(SupplementList, Username)
|
||||
|
||||
RDSNotificationListAdd = ''
|
||||
RDSNotificationListRemove = ''
|
||||
Action = ''
|
||||
@ -581,7 +581,7 @@ Service SetSupplement(SupplementList, Username)
|
||||
Error_Services('Add', 'SupplementList argument was missing from the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
* //Now send an email notification
|
||||
// Now send an email notification
|
||||
IF RDSNotificationListAdd NE '' then
|
||||
Instructions = XLATE('RDS', RDSNotificationListAdd<1>, RDS_SUPPL_INST$, 'X')
|
||||
PSN = XLATE('RDS', RDSNotificationListAdd<1>, RDS_PROD_SPEC_ID$, 'X')
|
||||
@ -637,6 +637,7 @@ Service SetSupplement(SupplementList, Username)
|
||||
Parms = Recipients:@RM:SendFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -701,6 +702,7 @@ end service
|
||||
// Returns True$ if RDS is valid
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service IsValidRDS(RDSNo, RDSType)
|
||||
|
||||
IsValid = False$
|
||||
FirstChar = RDSNo[1,1]
|
||||
*debug
|
||||
@ -727,12 +729,14 @@ Service IsValidRDS(RDSNo, RDSType)
|
||||
End Case
|
||||
|
||||
Response = IsValid
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service IsValidSubLot(RDSNo, RDSType, SupplierLot)
|
||||
|
||||
IsValid = False$
|
||||
rec = ''
|
||||
*debug
|
||||
Begin Case
|
||||
|
||||
Case RDSType EQ 'SIC'
|
||||
@ -755,12 +759,14 @@ Service IsValidSubLot(RDSNo, RDSType, SupplierLot)
|
||||
IsValid = True$
|
||||
end
|
||||
|
||||
End Case
|
||||
|
||||
End Case
|
||||
Response = IsValid
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetRDSRunHistoryByReactorAndWO(ReactorNo, WO)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'GetRDSRunHistoryByReactorAndWO'
|
||||
|
||||
@ -800,10 +806,12 @@ Service GetRDSRunHistoryByReactorAndWO(ReactorNo, WO)
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service IsTWLoggingReqd(RDSNo)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'IsTWLoggingReqd'
|
||||
|
||||
@ -870,9 +878,12 @@ Service IsTWLoggingReqd(RDSNo)
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service TestWaferRanAfterLoad(RDSNo)
|
||||
|
||||
TestWaferRanAfterLoad = False$
|
||||
TestWaferKeys = Test_Run_Services('GetTestRunKeysByRDS', RDSNo)
|
||||
for each Key in TestWaferKeys using @VM
|
||||
@ -891,8 +902,10 @@ Service TestWaferRanAfterLoad(RDSNo)
|
||||
Next Key
|
||||
|
||||
Response = TestWaferRanAfterLoad
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// VerifyEPPMetrology
|
||||
//
|
||||
@ -1027,11 +1040,6 @@ Service VerifyEPPMetrology(RDSNo)
|
||||
IF LayerList<I,COL$THICK_AVG_Z1> = '' AND LayerList<I,COL$RRHO_AVG_Z1> = '' AND LayerList<I,COL$MET_NO_Z1> NE '' THEN
|
||||
ErrorMsg = 'Zone 1 Metrology is Incomplete for RDS: ':RDSNo
|
||||
END
|
||||
//Added check for missing res avg data - JRO
|
||||
/*IF LayerList<I,COL$THICK_AVG_Z1> NE '' AND LayerList<I,COL$RRHO_AVG_Z1> = '' AND LayerList<I,COL$MET_NO_Z1> NE '' THEN
|
||||
If Error_Services('NoError') then Error_Services('Add', 'Zone 1 Metrology is missing Resistivity data for RDS: ':RDSNo)
|
||||
END
|
||||
*/
|
||||
END
|
||||
END
|
||||
END
|
||||
@ -1048,20 +1056,13 @@ Service VerifyEPPMetrology(RDSNo)
|
||||
|
||||
IF NOT(obj_RDS_Test('TestComplete',MetNo:@RM:MetRec)) THEN
|
||||
ErrorMsg = 'Zone 2 Metrology is Incomplete for RDS: ':RDSNo
|
||||
END ELSE
|
||||
|
||||
END ELSE
|
||||
IF ( (obj_RDS_Test('OutOfSpec',MetNo:@RM:MetRec) = 1) and (Zone2Scrapped EQ False$) ) THEN
|
||||
ErrorMsg = 'Zone 2 Metrology is Out of Spec for RDS: ':RDSNo
|
||||
END ELSE
|
||||
IF LayerList<I,COL$THICK_AVG_Z2> = '' AND LayerList<I,COL$RRHO_AVG_Z2> = '' AND LayerList<I,COL$MET_NO_Z2> NE '' THEN
|
||||
ErrorMsg = 'Zone 2 Metrology is Incomplete for RDS: ':RDSNo
|
||||
END
|
||||
/*
|
||||
//Added check for missing res avg data - JRO
|
||||
IF LayerList<I,COL$THICK_AVG_Z2> NE '' AND LayerList<I,COL$RRHO_AVG_Z2> = '' AND LayerList<I,COL$MET_NO_Z2> NE '' THEN
|
||||
If Error_Services('NoError') then Error_Services('Add', 'Zone 2 Metrology is missing Resistivity data for RDS: ':RDSNo)
|
||||
END
|
||||
*/
|
||||
END
|
||||
END
|
||||
END
|
||||
@ -1122,6 +1123,7 @@ end service
|
||||
|
||||
|
||||
Service CopyRDSLayerParameters(RDSNo)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'CopyRDSLayerParameters'
|
||||
|
||||
@ -1178,6 +1180,7 @@ Service CopyRDSLayerParameters(RDSNo)
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1208,6 +1211,7 @@ end service
|
||||
|
||||
|
||||
Service ConvertRecordToJSON(KeyID, Record, itemURL)
|
||||
|
||||
jsonRecord = ''
|
||||
If KeyID NE '' then
|
||||
|
||||
@ -1385,8 +1389,7 @@ Service ConvertRecordToJSON(KeyID, Record, itemURL)
|
||||
end
|
||||
|
||||
If itemURL NE '' then
|
||||
// The itemURL was passed in so add HAL+JSON properties.
|
||||
|
||||
// The itemURL was passed in so add HAL+JSON properties.
|
||||
// Create the _links property and then all link objects needed for this resource.
|
||||
If SRP_JSON(objLinks, 'New', 'Object') then
|
||||
// Create a self link.
|
||||
@ -1398,8 +1401,7 @@ Service ConvertRecordToJSON(KeyID, Record, itemURL)
|
||||
end
|
||||
SRP_JSON(objJSON, 'Set', '_links', objLinks)
|
||||
SRP_JSON(objLinks, 'Release')
|
||||
end
|
||||
|
||||
end
|
||||
// Create the _class property for this resource.
|
||||
SRP_JSON(objJSON, 'SetValue', '_class', 'resource')
|
||||
end
|
||||
@ -1412,7 +1414,6 @@ Service ConvertRecordToJSON(KeyID, Record, itemURL)
|
||||
end else
|
||||
Error_Services('Add', 'KeyID argument was missing in the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
Response = jsonRecord
|
||||
|
||||
end service
|
||||
@ -1722,12 +1723,13 @@ Service UnsignLoadExtra2(RDSNo, LSLUserName)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service ApplyQA100PercentADE(RDSNo)
|
||||
|
||||
Result = False$
|
||||
ErrorMsg = ''
|
||||
If RDSNo NE '' then
|
||||
// Change the QA metrology requirements to all wafers
|
||||
// Change the QA metrology requirements to all wafers
|
||||
WoNo = Xlate('RDS', RDSNo, RDS_WO$, 'X')
|
||||
CassNo = Xlate('RDS', RDSNo, 'CASS_NO', 'X')
|
||||
WoMatQaKey = WoNo : '*' : CassNo
|
||||
@ -1801,6 +1803,7 @@ Service ApplyQA100PercentADE(RDSNo)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service ApplyAbortMetrology(RdsKeys)
|
||||
|
||||
Result = False$
|
||||
@ -1840,7 +1843,9 @@ Service ApplyAbortMetrology(RdsKeys)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service DetachRDSFromWO(RDSNo)
|
||||
|
||||
ErrorMessage = ''
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
@ -1860,6 +1865,127 @@ Service DetachRDSFromWO(RDSNo)
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service PushSigProfileToWoMat(RDSNo)
|
||||
|
||||
ErrorMsg = ''
|
||||
If (RDSNo NE '') then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
Record = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
If Error_Services('NoError') then
|
||||
WONo = Record<RDS_WO$>
|
||||
ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X')
|
||||
EpiPro = (ReactType EQ 'EPP')
|
||||
GaN = (ReactType EQ 'GAN')
|
||||
NonEpiPro = ( (ReactType NE 'EPP') and (ReactType NE 'GAN') )
|
||||
If NonEpiPro then
|
||||
// Sync up VER, LOAD, UNLOAD, POST, and QA signatures with WO_MAT signature profile.
|
||||
// The goal of signature services was to remove any dependency on the WO_MAT signature profile,
|
||||
// however Fabtime relies on this data being replicated to the Scrape SQL DB.
|
||||
WOMatKey = Xlate('RDS', RDSNo, 'WO_MAT_KEY', 'X')
|
||||
If WOMatKey NE '' then
|
||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
||||
If Error_Services('NoError') then
|
||||
WOMatSigProf = obj_WO_Mat('CassSigProfile', WOMatKey)
|
||||
WOMatSig = WOMatRec<WO_MAT_SIGNATURE$>
|
||||
WOMatSigDTM = WOMatRec<WO_MAT_SIG_DTM$>
|
||||
|
||||
// Update WO_MAT signature profile to match for the "1VER" stage
|
||||
Stage = '1VER'
|
||||
Locate Stage in WOMatSigProf using @VM setting vPos then
|
||||
WOMatSig<0, vPos> = Record<RDS_PRE_EPI_SIG$>
|
||||
PreEpiDate = Record<RDS_PRE_EPI_SIG_DATE$>
|
||||
If PreEpiDate NE '' then
|
||||
PreEpiTime = Record<RDS_PRE_EPI_SIG_TIME$>
|
||||
PreEpiSigDTM = PreEpiDate + (PreEpiTime/86400)
|
||||
end else
|
||||
PreEpiSigDTM = ''
|
||||
end
|
||||
WOMatSigDTM<0, vPos> = PreEpiSigDTM
|
||||
end
|
||||
|
||||
// Update WO_MAT signature profile to match for "1LOAD" stage
|
||||
Stage = '1LOAD'
|
||||
Locate Stage in WOMatSigProf using @VM setting vPos then
|
||||
WOMatSig<0, vPos> = Record<RDS_OPERATOR_IN$>
|
||||
DateIn = Record<RDS_DATE_IN$>
|
||||
If DateIn NE '' then
|
||||
LoadTime = Record<RDS_TIME_IN$>
|
||||
LoadSigDTM = DateIn + (LoadTime/86400)
|
||||
end else
|
||||
LoadSigDTM = ''
|
||||
end
|
||||
WOMatSigDTM<0, vPos> = LoadSigDTM
|
||||
end
|
||||
|
||||
// Update WO_MAT signature profile to match for the "1UNLOAD" stage
|
||||
Stage = '1UNLOAD'
|
||||
Locate Stage in WOMatSigProf using @VM setting vPos then
|
||||
WOMatSig<0, vPos> = Record<RDS_OPERATOR_OUT$>
|
||||
DateOut = Record<RDS_DATE_OUT$>
|
||||
If DateOut NE '' then
|
||||
TimeOut = Record<RDS_TIME_OUT$>
|
||||
TimeOutSigDTM = DateOut + (TimeOut/86400)
|
||||
end else
|
||||
TimeOutSigDTM = ''
|
||||
end
|
||||
WOMatSigDTM<0, vPos> = TimeOutSigDTM
|
||||
end
|
||||
|
||||
// Update WO_MAT signature profile to match for the "1POST" stage
|
||||
Stage = '1POST'
|
||||
Locate Stage in WOMatSigProf using @VM setting vPos then
|
||||
WOMatSig<0, vPos> = Record<RDS_POST_EPI_SIG$>
|
||||
PostSigDate = Record<RDS_POST_EPI_SIG_DATE$>
|
||||
If PostSigDate NE '' then
|
||||
PostSigTime = Record<RDS_POST_EPI_SIG_TIME$>
|
||||
PostSigDTM = PostSigDate + (PostSigTime/86400)
|
||||
end else
|
||||
PostSigDTM = ''
|
||||
end
|
||||
WOMatSigDTM<0, vPos> = PostSigDTM
|
||||
end
|
||||
|
||||
// Update WO_MAT signature profile to match for the "1QA" stage
|
||||
Stage = '1QA'
|
||||
Locate Stage in WOMatSigProf using @VM setting vPos then
|
||||
WOMatSig<0, vPos> = Record<RDS_SUP_VER_SIG$>
|
||||
FQADate = Record<RDS_SUP_VER_SIG_DATE$>
|
||||
If FQADate NE '' then
|
||||
FQASigTime = Record<RDS_SUP_VER_SIG_TIME$>
|
||||
FQASigDTM = FQADate + (FQASigTime/86400)
|
||||
end else
|
||||
FQASigDTM = ''
|
||||
end
|
||||
WOMatSigDTM<0, vPos> = FQASigDTM
|
||||
end
|
||||
|
||||
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_PROFILE$, WOMatSigProf)
|
||||
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIGNATURE$, WOMatSig)
|
||||
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_DTM$, WOMatSigDTM)
|
||||
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null WO_MAT_KEY returned for RDS ':RDSNo:'.'
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. RDS ':RDSNo:' does not exist.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null RDSNo passed into service.'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -1874,12 +2000,3 @@ ClearCursors:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user