Fixed some error throwing in LOT_SERVICES
This commit is contained in:
@ -1,10 +1,56 @@
|
|||||||
Compile function Lot_Services(@Service, @Params)
|
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 LOT_EQUATES
|
||||||
$Insert TEST_WAFER_PROD_EQUATES
|
$Insert TEST_WAFER_PROD_EQUATES
|
||||||
$Insert Lot_Operation_Equates
|
$Insert LOT_OPERATION_EQUATES
|
||||||
$Insert PRODUCT_OPERATION_EQUATES
|
$Insert PRODUCT_OPERATION_EQUATES
|
||||||
$Insert LOT_EVENT_EQUATES
|
$Insert LOT_EVENT_EQUATES
|
||||||
$Insert NOTIFICATION_EQUATES
|
$Insert NOTIFICATION_EQUATES
|
||||||
@ -58,9 +104,9 @@ GoToService
|
|||||||
|
|
||||||
Return Response or ""
|
Return Response or ""
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
// SERVICES
|
// Services
|
||||||
//-----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Service GenerateNewLotId(LotType)
|
Service GenerateNewLotId(LotType)
|
||||||
|
|
||||||
@ -115,8 +161,8 @@ Service GenerateNewLotId(LotType)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
Repeat
|
Repeat
|
||||||
Case OTHERWISE$
|
Case Otherwise$
|
||||||
//null
|
Null
|
||||||
End Case
|
End Case
|
||||||
If GeneratedLotID NE '' AND ValidLotNum then
|
If GeneratedLotID NE '' AND ValidLotNum then
|
||||||
// Write the new lot id now so it's reserved
|
// Write the new lot id now so it's reserved
|
||||||
@ -135,9 +181,8 @@ Service GetLotIdByLegacyLotIdAndType(LegacyLotId, LegacyLotType)
|
|||||||
|
|
||||||
StartTick = GetTickCount()
|
StartTick = GetTickCount()
|
||||||
MetricName = 'GetLotIdByLegacyLotIdAndType'
|
MetricName = 'GetLotIdByLegacyLotIdAndType'
|
||||||
|
ErrorMsg = ''
|
||||||
Open 'DICT.LOT' to DictLot then
|
Open 'DICT.LOT' to DictLot then
|
||||||
|
|
||||||
SearchString = ''
|
SearchString = ''
|
||||||
SearchString := 'LEGACY_LOT_ID':@VM:LegacyLotId:@FM
|
SearchString := 'LEGACY_LOT_ID':@VM:LegacyLotId:@FM
|
||||||
SearchString := 'TYPE':@VM:LegacyLotType:@FM
|
SearchString := 'TYPE':@VM:LegacyLotType:@FM
|
||||||
@ -149,7 +194,6 @@ Service GetLotIdByLegacyLotIdAndType(LegacyLotId, LegacyLotType)
|
|||||||
end else
|
end else
|
||||||
Response = LotIdKeys<1,1>
|
Response = LotIdKeys<1,1>
|
||||||
end
|
end
|
||||||
|
|
||||||
end else
|
end else
|
||||||
ErrorMsg = 'Error in ':Service:' service. Error opening LOT dictionary.'
|
ErrorMsg = 'Error in ':Service:' service. Error opening LOT dictionary.'
|
||||||
end
|
end
|
||||||
@ -157,6 +201,8 @@ Service GetLotIdByLegacyLotIdAndType(LegacyLotId, LegacyLotType)
|
|||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||||
|
|
||||||
end service
|
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.'
|
ErrorMessage = 'Error in ':Service:' service. Lot Type "':LotType:'" is not currently supported.'
|
||||||
End Case
|
End Case
|
||||||
|
|
||||||
|
EndTick = GetTickCount()
|
||||||
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
If ErrorMessage EQ '' then
|
If ErrorMessage EQ '' then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
@ -310,9 +359,6 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
|||||||
end
|
end
|
||||||
Response = CreatedLotNumber
|
Response = CreatedLotNumber
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
|
||||||
|
|
||||||
End Service
|
End Service
|
||||||
|
|
||||||
|
|
||||||
@ -417,13 +463,13 @@ Service CreateNewTestWaferLot(LotType, ProdName, LotQty, VendorPartNo, VendorLot
|
|||||||
LogData<4> = 'Successfully created lot id ' : CreatedLotNumber : ' of product type ' : ProdName '.'
|
LogData<4> = 'Successfully created lot id ' : CreatedLotNumber : ' of product type ' : ProdName '.'
|
||||||
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
||||||
end else
|
end else
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
LogData<2> = ProdName
|
LogData<2> = ProdName
|
||||||
LogData<3> = Username
|
LogData<3> = Username
|
||||||
LogData<4> = ErrorMessage
|
LogData<4> = ErrorMessage
|
||||||
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
||||||
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
Response = CreatedLotNumber
|
Response = CreatedLotNumber
|
||||||
|
|
||||||
@ -452,22 +498,20 @@ Service GenerateInitialLotOperationRecords(LotId)
|
|||||||
end
|
end
|
||||||
// ID will be LotNum + OperationID
|
// ID will be LotNum + OperationID
|
||||||
// Get product operations
|
// Get product operations
|
||||||
|
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Lot ID does not exist.'
|
ErrorMessage = 'Lot ID does not exist.'
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Lot ID was null'
|
ErrorMessage = 'Lot ID was null'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
Service GetPrescribedOperationsByProdId(ProdId, ProdType)
|
Service GetPrescribedOperationsByProdId(ProdId, ProdType)
|
||||||
|
|
||||||
|
ErrorMsg = ''
|
||||||
ProdOperationKeys = ''
|
ProdOperationKeys = ''
|
||||||
If ProdId NE '' then
|
If ProdId NE '' then
|
||||||
Begin Case
|
Begin Case
|
||||||
@ -475,12 +519,17 @@ Service GetPrescribedOperationsByProdId(ProdId, ProdType)
|
|||||||
ProdRec = Database_Services('ReadDataRow', 'TEST_WAFER_PROD', ProdId)
|
ProdRec = Database_Services('ReadDataRow', 'TEST_WAFER_PROD', ProdId)
|
||||||
ProdOperationKeys = ProdRec<TEST_WAFER_PROD_PRODUCT_OPERATIONS$>
|
ProdOperationKeys = ProdRec<TEST_WAFER_PROD_PRODUCT_OPERATIONS$>
|
||||||
Case Otherwise$
|
Case Otherwise$
|
||||||
//error, no matching prod type.
|
ErrorMsg = 'Error in ':Service:' service. No matching prod type.'
|
||||||
End Case
|
End Case
|
||||||
end else
|
end else
|
||||||
//Error: ProdID was null
|
ErrorMsg = 'Error in ':Service:' service. Null ProdId passed into service.'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
If ErrorMsg EQ '' then
|
||||||
Response = ProdOperationKeys
|
Response = ProdOperationKeys
|
||||||
|
end else
|
||||||
|
Error_Services('Add', ErrorMsg)
|
||||||
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -495,11 +544,9 @@ Service CreateInitialLotOperationRecords(LotId)
|
|||||||
ThisInitialProdOperations = Lot_Services('GetPrescribedOperationsByProdId', ProdId, LotType)
|
ThisInitialProdOperations = Lot_Services('GetPrescribedOperationsByProdId', ProdId, LotType)
|
||||||
If Error_Services('NoError') AND ThisInitialProdOperations NE '' then
|
If Error_Services('NoError') AND ThisInitialProdOperations NE '' then
|
||||||
For each ProdOperation in ThisInitialProdOperations using @VM
|
For each ProdOperation in ThisInitialProdOperations using @VM
|
||||||
|
|
||||||
ProdOperationRec = Database_Services('ReadDataRow', 'PRODUCT_OPERATION', ProdOperation)
|
ProdOperationRec = Database_Services('ReadDataRow', 'PRODUCT_OPERATION', ProdOperation)
|
||||||
OperationID = ProdOperationRec<PRODUCT_OPERATION_OPERATION_ID$>
|
OperationID = ProdOperationRec<PRODUCT_OPERATION_OPERATION_ID$>
|
||||||
OperationSequence = ProdOperationRec<PRODUCT_OPERATION_OPERATION_SEQUENCE$>
|
OperationSequence = ProdOperationRec<PRODUCT_OPERATION_OPERATION_SEQUENCE$>
|
||||||
|
|
||||||
LotOperationRecID = Rti_Createguid()
|
LotOperationRecID = Rti_Createguid()
|
||||||
If Not(RowExists('LOT_OPERATION', LotOperationRecID)) then
|
If Not(RowExists('LOT_OPERATION', LotOperationRecID)) then
|
||||||
LotOperationRec = ''
|
LotOperationRec = ''
|
||||||
@ -510,20 +557,16 @@ Service CreateInitialLotOperationRecords(LotId)
|
|||||||
Database_Services('WriteDataRow', 'LOT_OPERATION', LotOperationRecId, LotOperationRec)
|
Database_Services('WriteDataRow', 'LOT_OPERATION', LotOperationRecId, LotOperationRec)
|
||||||
TestRec = Database_Services('ReadDataRow', 'LOT', LotId)
|
TestRec = Database_Services('ReadDataRow', 'LOT', LotId)
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Lot Operation already existed, cannot overwrite'
|
ErrorMessage = 'Error in ':Service:' service. Lot Operation already existed, cannot overwrite.'
|
||||||
end
|
end
|
||||||
|
|
||||||
Next Operation
|
Next Operation
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error getting prescribed operations for lot# ' : LotId
|
ErrorMessage = 'Error in ':Service:' service. Error getting prescribed operations for lot# ' : LotId
|
||||||
end
|
end
|
||||||
|
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Lot ID was null'
|
ErrorMessage = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||||
end
|
|
||||||
If ErrorMessage NE '' then
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
end
|
||||||
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -533,7 +576,7 @@ Service GetLotOperationSequence(LotId)
|
|||||||
|
|
||||||
StartTick = GetTickCount()
|
StartTick = GetTickCount()
|
||||||
MetricName = 'GetLotOperationSequence'
|
MetricName = 'GetLotOperationSequence'
|
||||||
|
ErrorMsg = ''
|
||||||
LotOperationsInSequence = ''
|
LotOperationsInSequence = ''
|
||||||
If LotID NE '' then
|
If LotID NE '' then
|
||||||
// Get Operations
|
// Get Operations
|
||||||
@ -543,13 +586,18 @@ Service GetLotOperationSequence(LotId)
|
|||||||
LotOperationsInSequence<ThisLotOperationSequence> = LotOperation
|
LotOperationsInSequence<ThisLotOperationSequence> = LotOperation
|
||||||
Next LotOperation
|
Next LotOperation
|
||||||
end else
|
end else
|
||||||
//error: lot id was null
|
ErrorMsg = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||||
end
|
end
|
||||||
Response = LotOperationsInSequence
|
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMsg EQ '' then
|
||||||
|
Response = LotOperationsInSequence
|
||||||
|
end else
|
||||||
|
Error_Services('Add', ErrorMsg)
|
||||||
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -571,13 +619,15 @@ Service GetLotCurrOperationId(LotId)
|
|||||||
until CurrOperation
|
until CurrOperation
|
||||||
Next LotOperation
|
Next LotOperation
|
||||||
end else
|
end else
|
||||||
//error: lot id was null
|
ErrorMsg = 'Error in ':Service:' service. Null LotID passed into service'
|
||||||
end
|
end
|
||||||
Response = CurrOperation
|
Response = CurrOperation
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -585,7 +635,7 @@ Service GetLotCurrOperationName(LotId)
|
|||||||
|
|
||||||
StartTick = GetTickCount()
|
StartTick = GetTickCount()
|
||||||
MetricName = 'GetLotCurrOperationName'
|
MetricName = 'GetLotCurrOperationName'
|
||||||
|
ErrorMsg = ''
|
||||||
CurrOperationId = ''
|
CurrOperationId = ''
|
||||||
CurrOperationName = ''
|
CurrOperationName = ''
|
||||||
If LotID NE '' then
|
If LotID NE '' then
|
||||||
@ -601,13 +651,18 @@ Service GetLotCurrOperationName(LotId)
|
|||||||
until CurrOperationName
|
until CurrOperationName
|
||||||
Next LotOperation
|
Next LotOperation
|
||||||
end else
|
end else
|
||||||
//error: lot id was null
|
ErrorMsg = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||||
end
|
end
|
||||||
Response = CurrOperationName
|
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMsg EQ '' then
|
||||||
|
Response = CurrOperationName
|
||||||
|
end else
|
||||||
|
Error_Services('Add', ErrorMsg)
|
||||||
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -647,21 +702,19 @@ Service AddLotOperationIntoSequence(LotId, NewOperationId, NewSequence, Rework)
|
|||||||
LotOperationRec<LOT_OPERATION_REWORK$> = Rework
|
LotOperationRec<LOT_OPERATION_REWORK$> = Rework
|
||||||
Database_Services('WriteDataRow', 'LOT_OPERATION', LotOperationRecId, LotOperationRec)
|
Database_Services('WriteDataRow', 'LOT_OPERATION', LotOperationRecId, LotOperationRec)
|
||||||
end else
|
end else
|
||||||
//Error: Lot Operation already existed, cannot overwrite
|
ErrorMessage = 'Error in ':Service:' service. Lot Operation already existed, cannot overwrite'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end else
|
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
|
||||||
end else
|
end else
|
||||||
//Error: null or invalid sequence passed to routine
|
ErrorMessage = 'Error in ':Service:' service. Null or invalid sequence passed to routine'
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
//Error: Lot id was null
|
ErrorMessage = 'Error in ':Service:' service. Null LotID passed into service.'
|
||||||
end
|
|
||||||
If ErrorMessage NE '' then
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
end
|
||||||
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -675,11 +728,7 @@ Service IsLotMovedIn(LotId)
|
|||||||
If RowExists('LOT', LotId) then
|
If RowExists('LOT', LotId) then
|
||||||
CurrOperId = Lot_Services('GetLotCurrOperationId', LotId)
|
CurrOperId = Lot_Services('GetLotCurrOperationId', LotId)
|
||||||
CurrOperDtmIn = Database_Services('ReadDataColumn', 'LOT_OPERATION', CurrOperId, LOT_OPERATION_DATETIME_IN$, True$, 0, False$)
|
CurrOperDtmIn = Database_Services('ReadDataColumn', 'LOT_OPERATION', CurrOperId, LOT_OPERATION_DATETIME_IN$, True$, 0, False$)
|
||||||
If CurrOperDtmIn LE Datetime() AND CurrOperDtmIn NE '' then
|
Response = ( (CurrOperDtmIn LE Datetime()) AND (CurrOperDtmIn NE '') )
|
||||||
Response = True$
|
|
||||||
end else
|
|
||||||
Response = False$
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
@ -699,9 +748,9 @@ Service IsOperationCompleted(LotOperationId)
|
|||||||
ErrorMessage = 'Invalid lot operation id passed to routine.'
|
ErrorMessage = 'Invalid lot operation id passed to routine.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
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
|
end
|
||||||
response = OperationCompleted
|
Response = OperationCompleted
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -725,17 +774,26 @@ Service StartLot(LotId, Operator)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in ':Service:' process. Lot id was not passed to routine.'
|
ErrorMessage = 'Error in ':Service:' process. Lot id was not passed to routine.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
|
EndTick = GetTickCount()
|
||||||
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
LogData<2> = LotID
|
LogData<2> = LotID
|
||||||
LogData<3> = Operator
|
LogData<3> = Operator
|
||||||
LogData<4> = 'Successfully started lot.'
|
LogData<4> = 'Successfully started lot.'
|
||||||
Logging_Services('AppendLog', objLotStartLog, LogData, @RM, @FM, False$)
|
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)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
EndTick = GetTickCount()
|
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -754,7 +812,11 @@ Service BeginRun(LotId, Operator, ToolId)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in ':Service:' process. Lot id, Operator, or ToolId was not passed to routine.'
|
ErrorMessage = 'Error in ':Service:' process. Lot id, Operator, or ToolId was not passed to routine.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
|
EndTick = GetTickCount()
|
||||||
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
LogData<2> = LotID
|
LogData<2> = LotID
|
||||||
@ -762,10 +824,16 @@ Service BeginRun(LotId, Operator, ToolId)
|
|||||||
LogData<4> = ToolId
|
LogData<4> = ToolId
|
||||||
LogData<4> = 'Successfully began run.'
|
LogData<4> = 'Successfully began run.'
|
||||||
Logging_Services('AppendLog', objLotRunLog, LogData, @RM, @FM, False$)
|
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)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
EndTick = GetTickCount()
|
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -784,18 +852,28 @@ Service EndRun(LotId, Operator, ToolId)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in ':Service:' process. Lot id, Operator, or ToolId was not passed to routine.'
|
ErrorMessage = 'Error in ':Service:' process. Lot id, Operator, or ToolId was not passed to routine.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
|
EndTick = GetTickCount()
|
||||||
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
LogData<2> = LotID
|
LogData<2> = LotID
|
||||||
LogData<3> = Operator
|
LogData<3> = Operator
|
||||||
LogData<4> = ToolId
|
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$)
|
Logging_Services('AppendLog', objLotRunLog, LogData, @RM, @FM, False$)
|
||||||
Error_Services('Add', ErrorMessage)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
EndTick = GetTickCount()
|
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, Service, StartTick, EndTick)
|
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -804,7 +882,6 @@ Service MoveInLot(LotID, Operator)
|
|||||||
|
|
||||||
StartTick = GetTickCount()
|
StartTick = GetTickCount()
|
||||||
MetricName = 'MoveInLot'
|
MetricName = 'MoveInLot'
|
||||||
|
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
ThisLotCurrOperationID = ''
|
ThisLotCurrOperationID = ''
|
||||||
If LotId NE '' then
|
If LotId NE '' then
|
||||||
@ -849,19 +926,27 @@ Service MoveInLot(LotID, Operator)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in Move In process. Lot id was not passed to routine.'
|
ErrorMessage = 'Error in Move In process. Lot id was not passed to routine.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
|
EndTick = GetTickCount()
|
||||||
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
LogData<2> = LotID
|
LogData<2> = LotID
|
||||||
LogData<3> = Operator
|
LogData<3> = Operator
|
||||||
LogData<4> = 'Successfully Moved Lot into operation ' : ThisLotCurrOperationID : '.'
|
LogData<4> = 'Successfully Moved Lot into operation ' : ThisLotCurrOperationID : '.'
|
||||||
Logging_Services('AppendLog', objLotMoveLog, LogData, @RM, @FM, False$)
|
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)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -869,7 +954,6 @@ Service MoveOutLot(LotID, Operator)
|
|||||||
|
|
||||||
StartTick = GetTickCount()
|
StartTick = GetTickCount()
|
||||||
MetricName = 'MoveOutLot'
|
MetricName = 'MoveOutLot'
|
||||||
|
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
ThisLotCurrOperationID = ''
|
ThisLotCurrOperationID = ''
|
||||||
If LotId NE '' then
|
If LotId NE '' then
|
||||||
@ -912,14 +996,17 @@ Service MoveOutLot(LotID, Operator)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in Move Out process. Lot id was not passed to routine.'
|
ErrorMessage = 'Error in Move Out process. Lot id was not passed to routine.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
|
EndTick = GetTickCount()
|
||||||
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
LogData<2> = LotID
|
LogData<2> = LotID
|
||||||
LogData<3> = Operator
|
LogData<3> = Operator
|
||||||
LogData<4> = 'Successfully Moved Lot out of operation ' : ThisLotCurrOperationID : '.'
|
LogData<4> = 'Successfully Moved Lot out of operation ' : ThisLotCurrOperationID : '.'
|
||||||
Logging_Services('AppendLog', objLotMoveLog, LogData, @RM, @FM, False$)
|
Logging_Services('AppendLog', objLotMoveLog, LogData, @RM, @FM, False$)
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end else
|
end else
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
@ -930,9 +1017,6 @@ Service MoveOutLot(LotID, Operator)
|
|||||||
Error_Services('Add', ErrorMessage)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -940,16 +1024,13 @@ Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
|||||||
|
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
JsonString = ''
|
JsonString = ''
|
||||||
If FullObject EQ '' then
|
If FullObject EQ '' then FullObject = True$
|
||||||
FullObject = True$
|
|
||||||
end
|
|
||||||
If RowExists('LOT', LotId) then
|
If RowExists('LOT', LotId) then
|
||||||
objJSON = ''
|
objJSON = ''
|
||||||
If SRP_JSON(objJSON, 'New', 'Object') then
|
If SRP_JSON(objJSON, 'New', 'Object') then
|
||||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId)
|
LotRec = Database_Services('ReadDataRow', 'LOT', LotId)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
If SRP_JSON(objLot, 'New', 'Object') then
|
If SRP_JSON(objLot, 'New', 'Object') then
|
||||||
|
|
||||||
SRP_JSON(objLot, 'SetValue', 'LotId', LotId)
|
SRP_JSON(objLot, 'SetValue', 'LotId', LotId)
|
||||||
SRP_JSON(objLot, 'SetValue', 'Type', LotRec<LOT_TYPE$>)
|
SRP_JSON(objLot, 'SetValue', 'Type', LotRec<LOT_TYPE$>)
|
||||||
SRP_JSON(objLot, 'SetValue', 'ProdId', LotRec<LOT_PROD_ID$>)
|
SRP_JSON(objLot, 'SetValue', 'ProdId', LotRec<LOT_PROD_ID$>)
|
||||||
@ -1053,10 +1134,12 @@ Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Invalid or null lot number passed to routine.'
|
ErrorMessage = 'Invalid or null lot number passed to routine.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
|
Response = JsonString
|
||||||
|
end else
|
||||||
Error_Services('Add', ErrorMessage)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
Response = JsonString
|
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
@ -1079,13 +1162,12 @@ Service OpenLot(LotId)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Unable to Open Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
ErrorMessage = 'Unable to Open Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -1093,7 +1175,6 @@ Service CloseLot(LotId)
|
|||||||
|
|
||||||
StartTick = GetTickCount()
|
StartTick = GetTickCount()
|
||||||
MetricName = 'CloseLot'
|
MetricName = 'CloseLot'
|
||||||
|
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
If RowExists('LOT', LotId) then
|
If RowExists('LOT', LotId) then
|
||||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||||
@ -1107,13 +1188,12 @@ Service CloseLot(LotId)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Unable to Close Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
ErrorMessage = 'Unable to Close Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -1285,13 +1365,12 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in Reduce Lot Wafer Count service, Lot Id ' : LotId : ' not found in lot table.'
|
ErrorMessage = 'Error in Reduce Lot Wafer Count service, Lot Id ' : LotId : ' not found in lot table.'
|
||||||
end
|
end
|
||||||
if ErrorMessage NE '' then
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -1337,13 +1416,12 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty, OperatorId)
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' not found in lot table.'
|
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' not found in lot table.'
|
||||||
end
|
end
|
||||||
if ErrorMessage NE '' then
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
@ -1427,12 +1505,15 @@ Service CreateNewVoidedLotRecord(LotId, LegacyLotId, LotType=LOT_TYPES, Username
|
|||||||
end else
|
end else
|
||||||
ErrorMessage = 'Username ' : Username : ' passed to CreateVoidedLotRecord routine does not exist.'
|
ErrorMessage = 'Username ' : Username : ' passed to CreateVoidedLotRecord routine does not exist.'
|
||||||
end
|
end
|
||||||
If ErrorMessage NE '' then
|
|
||||||
//Todo Log Error Message
|
|
||||||
end
|
|
||||||
|
|
||||||
EndTick = GetTickCount()
|
EndTick = GetTickCount()
|
||||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||||
|
|
||||||
|
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
// Internal GoSubs
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user