added check to verify PROC_NAME exists before invoking

This commit is contained in:
Infineon\StieberD
2025-07-14 09:36:07 -07:00
committed by Stieber Daniel (CSC FI SPS MESLEO)
parent cd64511871
commit 804b590773

View File

@ -212,9 +212,9 @@ end service
Service ProcessRequest(RequestKeyID)
If RequestKeyID NE '' then
DeleteRequest = True$
Server = Environment_Services('GetServer')
Done = True$
InvalidRequest = False$
DeleteRequest = True$
If RowExists('PROC_QUEUE2', RequestKeyID) then
RequestRow = Database_Services('ReadDataRow', 'PROC_QUEUE2', RequestKeyID)
If RequestRow NE '' then
@ -222,12 +222,15 @@ Service ProcessRequest(RequestKeyID)
Procedure = UCase(Procedure)
Params = RequestRow<PROC_QUEUE.PARAMS$>
If Procedure NE '' then
Dim ProcParams(12)
LSL2Key = '$':Procedure:'*LSL2'
FrameworksKey = '$':Procedure:'*FRAMEWORKS'
SysprogKey = '$':Procedure
If RowExists('SYSOBJ', LSL2Key) or RowExists('SYSOBJ', FrameworksKey) or RowExists('SYSOBJ', SysprogKey) then
Dim ProcParams(11)
For each Param in Params using @VM setting pPos
ProcParams(pPos) = Param
Next Param
NumArguments = DCount(Params, @VM)
Begin Case
Case NumArguments EQ 0 ; Call @Procedure()
Case NumArguments EQ 1 ; Call @Procedure(ProcParams(1))
@ -244,6 +247,13 @@ Service ProcessRequest(RequestKeyID)
Case Otherwise$
Error_Services('Add', 'Error in ':Service:' service. More than 11 arguments are not currently supported.')
End Case
end else
InvalidRequest = True$
Error_Services('Add', 'Error in ':Service:' service. PROC_NAME ':Quote(Procedure):' does not exist.')
end
end else
InvalidRequest = True$
Error_Services('Add', 'Error in ':Service:' service. Null PROC_NAME posted to queue.')
end
Swap @VM with ',' in Params
@ -253,10 +263,10 @@ Service ProcessRequest(RequestKeyID)
LogData<4> = Procedure
LogData<5> = Params
ErrCode = ''
If ( Get_Status(ErrCode) or Error_Services('HasError') ) then
If ( Get_Status(ErrCode) or Error_Services('HasError') or InvalidRequest) then
NumAttempts = RequestRow<PROC_QUEUE.NUM_ATTEMPTS$> + 1
ErrorMessage = Error_Services('GetMessage')
If NumAttempts LT 3 then
If ( (NumAttempts LT 3) and Not(InvalidRequest) ) then
DeleteRequest = False$
RequestRow<PROC_QUEUE.NUM_ATTEMPTS$> = NumAttempts
RequestRow<PROC_QUEUE.LAST_ATTEMPT_DTM$> = Datetime()