Fixed some error throwing in LOT_SERVICES
This commit is contained in:
@ -1,10 +1,56 @@
|
||||
Compile function Lot_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
/***********************************************************************************************************************
|
||||
|
||||
$insert APP_INSERTS
|
||||
Name : Lot_Services
|
||||
|
||||
Description : Handler program for all LOT services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/01/25 djs Corrected error throwing.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert APP_INSERTS
|
||||
$Insert LOT_EQUATES
|
||||
$Insert TEST_WAFER_PROD_EQUATES
|
||||
$Insert Lot_Operation_Equates
|
||||
$Insert LOT_OPERATION_EQUATES
|
||||
$Insert PRODUCT_OPERATION_EQUATES
|
||||
$Insert LOT_EVENT_EQUATES
|
||||
$Insert NOTIFICATION_EQUATES
|
||||
@ -58,9 +104,9 @@ GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// Services
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Service GenerateNewLotId(LotType)
|
||||
|
||||
@ -115,8 +161,8 @@ Service GenerateNewLotId(LotType)
|
||||
end
|
||||
end
|
||||
Repeat
|
||||
Case OTHERWISE$
|
||||
//null
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
If GeneratedLotID NE '' AND ValidLotNum then
|
||||
// Write the new lot id now so it's reserved
|
||||
@ -135,9 +181,8 @@ Service GetLotIdByLegacyLotIdAndType(LegacyLotId, LegacyLotType)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'GetLotIdByLegacyLotIdAndType'
|
||||
|
||||
ErrorMsg = ''
|
||||
Open 'DICT.LOT' to DictLot then
|
||||
|
||||
SearchString = ''
|
||||
SearchString := 'LEGACY_LOT_ID':@VM:LegacyLotId:@FM
|
||||
SearchString := 'TYPE':@VM:LegacyLotType:@FM
|
||||
@ -149,7 +194,6 @@ Service GetLotIdByLegacyLotIdAndType(LegacyLotId, LegacyLotType)
|
||||
end else
|
||||
Response = LotIdKeys<1,1>
|
||||
end
|
||||
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening LOT dictionary.'
|
||||
end
|
||||
@ -157,6 +201,8 @@ Service GetLotIdByLegacyLotIdAndType(LegacyLotId, LegacyLotType)
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -292,6 +338,9 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
||||
ErrorMessage = 'Error in ':Service:' service. Lot Type "':LotType:'" is not currently supported.'
|
||||
End Case
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
@ -310,9 +359,6 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
||||
end
|
||||
Response = CreatedLotNumber
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
@ -417,13 +463,13 @@ Service CreateNewTestWaferLot(LotType, ProdName, LotQty, VendorPartNo, VendorLot
|
||||
LogData<4> = 'Successfully created lot id ' : CreatedLotNumber : ' of product type ' : ProdName '.'
|
||||
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
Error_Services('Add', ErrorMessage)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = ProdName
|
||||
LogData<3> = Username
|
||||
LogData<4> = ErrorMessage
|
||||
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
Response = CreatedLotNumber
|
||||
|
||||
@ -452,22 +498,20 @@ Service GenerateInitialLotOperationRecords(LotId)
|
||||
end
|
||||
// ID will be LotNum + OperationID
|
||||
// Get product operations
|
||||
|
||||
end else
|
||||
ErrorMessage = 'Lot ID does not exist.'
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Lot ID was null'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetPrescribedOperationsByProdId(ProdId, ProdType)
|
||||
|
||||
ErrorMsg = ''
|
||||
ProdOperationKeys = ''
|
||||
If ProdId NE '' then
|
||||
Begin Case
|
||||
@ -475,12 +519,17 @@ Service GetPrescribedOperationsByProdId(ProdId, ProdType)
|
||||
ProdRec = Database_Services('ReadDataRow', 'TEST_WAFER_PROD', ProdId)
|
||||
ProdOperationKeys = ProdRec<TEST_WAFER_PROD_PRODUCT_OPERATIONS$>
|
||||
Case Otherwise$
|
||||
//error, no matching prod type.
|
||||
ErrorMsg = 'Error in ':Service:' service. No matching prod type.'
|
||||
End Case
|
||||
end else
|
||||
//Error: ProdID was null
|
||||
ErrorMsg = 'Error in ':Service:' service. Null ProdId passed into service.'
|
||||
end
|
||||
|
||||
If ErrorMsg EQ '' then
|
||||
Response = ProdOperationKeys
|
||||
end else
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
@ -495,11 +544,9 @@ Service CreateInitialLotOperationRecords(LotId)
|
||||
ThisInitialProdOperations = Lot_Services('GetPrescribedOperationsByProdId', ProdId, LotType)
|
||||
If Error_Services('NoError') AND ThisInitialProdOperations NE '' then
|
||||
For each ProdOperation in ThisInitialProdOperations using @VM
|
||||
|
||||
ProdOperationRec = Database_Services('ReadDataRow', 'PRODUCT_OPERATION', ProdOperation)
|
||||
OperationID = ProdOperationRec<PRODUCT_OPERATION_OPERATION_ID$>
|
||||
OperationSequence = ProdOperationRec<PRODUCT_OPERATION_OPERATION_SEQUENCE$>
|
||||
|
||||
LotOperationRecID = Rti_Createguid()
|
||||
If Not(RowExists('LOT_OPERATION', LotOperationRecID)) then
|
||||
LotOperationRec = ''
|
||||
@ -510,20 +557,16 @@ Service CreateInitialLotOperationRecords(LotId)
|
||||
Database_Services('WriteDataRow', 'LOT_OPERATION', LotOperationRecId, LotOperationRec)
|
||||
TestRec = Database_Services('ReadDataRow', 'LOT', LotId)
|
||||
end else
|
||||
ErrorMessage = 'Lot Operation already existed, cannot overwrite'
|
||||
ErrorMessage = 'Error in ':Service:' service. Lot Operation already existed, cannot overwrite.'
|
||||
end
|
||||
|
||||
Next Operation
|
||||
end else
|
||||
ErrorMessage = 'Error getting prescribed operations for lot# ' : LotId
|
||||
ErrorMessage = 'Error in ':Service:' service. Error getting prescribed operations for lot# ' : LotId
|
||||
end
|
||||
|
||||
end else
|
||||
ErrorMessage = 'Lot ID was null'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
ErrorMessage = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||
end
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
@ -533,7 +576,7 @@ Service GetLotOperationSequence(LotId)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'GetLotOperationSequence'
|
||||
|
||||
ErrorMsg = ''
|
||||
LotOperationsInSequence = ''
|
||||
If LotID NE '' then
|
||||
// Get Operations
|
||||
@ -543,13 +586,18 @@ Service GetLotOperationSequence(LotId)
|
||||
LotOperationsInSequence<ThisLotOperationSequence> = LotOperation
|
||||
Next LotOperation
|
||||
end else
|
||||
//error: lot id was null
|
||||
ErrorMsg = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||
end
|
||||
Response = LotOperationsInSequence
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg EQ '' then
|
||||
Response = LotOperationsInSequence
|
||||
end else
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -571,13 +619,15 @@ Service GetLotCurrOperationId(LotId)
|
||||
until CurrOperation
|
||||
Next LotOperation
|
||||
end else
|
||||
//error: lot id was null
|
||||
ErrorMsg = 'Error in ':Service:' service. Null LotID passed into service'
|
||||
end
|
||||
Response = CurrOperation
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -585,7 +635,7 @@ Service GetLotCurrOperationName(LotId)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'GetLotCurrOperationName'
|
||||
|
||||
ErrorMsg = ''
|
||||
CurrOperationId = ''
|
||||
CurrOperationName = ''
|
||||
If LotID NE '' then
|
||||
@ -601,13 +651,18 @@ Service GetLotCurrOperationName(LotId)
|
||||
until CurrOperationName
|
||||
Next LotOperation
|
||||
end else
|
||||
//error: lot id was null
|
||||
ErrorMsg = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||
end
|
||||
Response = CurrOperationName
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMsg EQ '' then
|
||||
Response = CurrOperationName
|
||||
end else
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -647,21 +702,19 @@ Service AddLotOperationIntoSequence(LotId, NewOperationId, NewSequence, Rework)
|
||||
LotOperationRec<LOT_OPERATION_REWORK$> = Rework
|
||||
Database_Services('WriteDataRow', 'LOT_OPERATION', LotOperationRecId, LotOperationRec)
|
||||
end else
|
||||
//Error: Lot Operation already existed, cannot overwrite
|
||||
ErrorMessage = 'Error in ':Service:' service. Lot Operation already existed, cannot overwrite'
|
||||
end
|
||||
end
|
||||
end else
|
||||
//Error: Not allowed to add new operations prior to current operation
|
||||
ErrorMessage = 'Error in ':Service:' service. Not allowed to add new operations prior to current operation'
|
||||
end
|
||||
end else
|
||||
//Error: null or invalid sequence passed to routine
|
||||
ErrorMessage = 'Error in ':Service:' service. Null or invalid sequence passed to routine'
|
||||
end
|
||||
end else
|
||||
//Error: Lot id was null
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
ErrorMessage = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||
end
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
@ -675,11 +728,7 @@ Service IsLotMovedIn(LotId)
|
||||
If RowExists('LOT', LotId) then
|
||||
CurrOperId = Lot_Services('GetLotCurrOperationId', LotId)
|
||||
CurrOperDtmIn = Database_Services('ReadDataColumn', 'LOT_OPERATION', CurrOperId, LOT_OPERATION_DATETIME_IN$, True$, 0, False$)
|
||||
If CurrOperDtmIn LE Datetime() AND CurrOperDtmIn NE '' then
|
||||
Response = True$
|
||||
end else
|
||||
Response = False$
|
||||
end
|
||||
Response = ( (CurrOperDtmIn LE Datetime()) AND (CurrOperDtmIn NE '') )
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
@ -699,9 +748,9 @@ Service IsOperationCompleted(LotOperationId)
|
||||
ErrorMessage = 'Invalid lot operation id passed to routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', 'Error in ' : service : ' with Lot OperationId ' : LotOperationId : ' : ' : ErrorMessage)
|
||||
Error_Services('Add', 'Error in ' : Service : ' with Lot OperationId ' : LotOperationId : ' : ' : ErrorMessage)
|
||||
end
|
||||
response = OperationCompleted
|
||||
Response = OperationCompleted
|
||||
|
||||
end service
|
||||
|
||||
@ -725,17 +774,26 @@ Service StartLot(LotId, Operator)
|
||||
end else
|
||||
ErrorMessage = 'Error in ':Service:' process. Lot id was not passed to routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = 'Successfully started lot.'
|
||||
Logging_Services('AppendLog', objLotStartLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = 'Error starting lot.'
|
||||
Logging_Services('AppendLog', objLotStartLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
@ -754,7 +812,11 @@ Service BeginRun(LotId, Operator, ToolId)
|
||||
end else
|
||||
ErrorMessage = 'Error in ':Service:' process. Lot id, Operator, or ToolId was not passed to routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
@ -762,10 +824,16 @@ Service BeginRun(LotId, Operator, ToolId)
|
||||
LogData<4> = ToolId
|
||||
LogData<4> = 'Successfully began run.'
|
||||
Logging_Services('AppendLog', objLotRunLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = ToolId
|
||||
LogData<4> = 'Error beginning run.'
|
||||
Logging_Services('AppendLog', objLotRunLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
@ -784,18 +852,28 @@ Service EndRun(LotId, Operator, ToolId)
|
||||
end else
|
||||
ErrorMessage = 'Error in ':Service:' process. Lot id, Operator, or ToolId was not passed to routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = ToolId
|
||||
LogData<4> = 'Successfully edned run.'
|
||||
LogData<4> = 'Successfully ended run.'
|
||||
Logging_Services('AppendLog', objLotRunLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = ToolId
|
||||
LogData<4> = 'Error ending run.'
|
||||
Logging_Services('AppendLog', objLotRunLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
@ -804,7 +882,6 @@ Service MoveInLot(LotID, Operator)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'MoveInLot'
|
||||
|
||||
ErrorMessage = ''
|
||||
ThisLotCurrOperationID = ''
|
||||
If LotId NE '' then
|
||||
@ -849,19 +926,27 @@ Service MoveInLot(LotID, Operator)
|
||||
end else
|
||||
ErrorMessage = 'Error in Move In process. Lot id was not passed to routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = 'Successfully Moved Lot into operation ' : ThisLotCurrOperationID : '.'
|
||||
Logging_Services('AppendLog', objLotMoveLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = 'Error moving Lot into operation ' : ThisLotCurrOperationID : '.'
|
||||
Logging_Services('AppendLog', objLotMoveLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -869,7 +954,6 @@ Service MoveOutLot(LotID, Operator)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'MoveOutLot'
|
||||
|
||||
ErrorMessage = ''
|
||||
ThisLotCurrOperationID = ''
|
||||
If LotId NE '' then
|
||||
@ -912,14 +996,17 @@ Service MoveOutLot(LotID, Operator)
|
||||
end else
|
||||
ErrorMessage = 'Error in Move Out process. Lot id was not passed to routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotID
|
||||
LogData<3> = Operator
|
||||
LogData<4> = 'Successfully Moved Lot out of operation ' : ThisLotCurrOperationID : '.'
|
||||
Logging_Services('AppendLog', objLotMoveLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
@ -930,9 +1017,6 @@ Service MoveOutLot(LotID, Operator)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -940,16 +1024,13 @@ Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
||||
|
||||
ErrorMessage = ''
|
||||
JsonString = ''
|
||||
If FullObject EQ '' then
|
||||
FullObject = True$
|
||||
end
|
||||
If FullObject EQ '' then FullObject = True$
|
||||
If RowExists('LOT', LotId) then
|
||||
objJSON = ''
|
||||
If SRP_JSON(objJSON, 'New', 'Object') then
|
||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId)
|
||||
If Error_Services('NoError') then
|
||||
If SRP_JSON(objLot, 'New', 'Object') then
|
||||
|
||||
SRP_JSON(objLot, 'SetValue', 'LotId', LotId)
|
||||
SRP_JSON(objLot, 'SetValue', 'Type', LotRec<LOT_TYPE$>)
|
||||
SRP_JSON(objLot, 'SetValue', 'ProdId', LotRec<LOT_PROD_ID$>)
|
||||
@ -1053,10 +1134,12 @@ Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
||||
end else
|
||||
ErrorMessage = 'Invalid or null lot number passed to routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
Response = JsonString
|
||||
end else
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
Response = JsonString
|
||||
|
||||
end service
|
||||
|
||||
@ -1079,13 +1162,12 @@ Service OpenLot(LotId)
|
||||
end else
|
||||
ErrorMessage = 'Unable to Open Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1093,7 +1175,6 @@ Service CloseLot(LotId)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'CloseLot'
|
||||
|
||||
ErrorMessage = ''
|
||||
If RowExists('LOT', LotId) then
|
||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||
@ -1107,13 +1188,12 @@ Service CloseLot(LotId)
|
||||
end else
|
||||
ErrorMessage = 'Unable to Close Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1285,13 +1365,12 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
|
||||
end else
|
||||
ErrorMessage = 'Error in Reduce Lot Wafer Count service, Lot Id ' : LotId : ' not found in lot table.'
|
||||
end
|
||||
if ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1337,13 +1416,12 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty, OperatorId)
|
||||
end else
|
||||
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' not found in lot table.'
|
||||
end
|
||||
if ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -1427,12 +1505,15 @@ Service CreateNewVoidedLotRecord(LotId, LegacyLotId, LotType=LOT_TYPES, Username
|
||||
end else
|
||||
ErrorMessage = 'Username ' : Username : ' passed to CreateVoidedLotRecord routine does not exist.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
//Todo Log Error Message
|
||||
end
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||
|
||||
end service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// Internal GoSubs
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user