project BLF > class RPCRequestService > method CheckMainContextProperties
Description
In this method is the code for checking the context properties written.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/rpcrequestservice.p)
if vcComponentNameRPCRS = ? or
vcComponentNameRPCRS = ""
then do:
create tErrors.
assign tErrors.tcFcMessage = trim(#T-1'The componentName context property must be specified.':255(5143)T-1#)
tErrors.tcFcMsgNumber = "BLF-RPCRS-2"
tErrors.tiFcSeverity = 3
tErrors.tcFcType = "E"
tErrors.tcFcContext = trim(#T-2'No system record is found.':255(9093)t-2#)
tErrors.tcFcRowid = string(rowid(tErrors))
oiReturnStatus = -1.
end.
if vcApplicationIdRPCRS <> "" and
vcApplicationIdRPCRS <> ?
then do:
<Q-6 run System (all) (Read) (NoCache)
(input ?, (LanguageID)
output dataset tqSystem) in BSystem >
find first tqSystem no-error.
if not available tqSystem
then do:
create tErrors.
assign tErrors.tcFcMessage = trim(#T-9'No system record is found.':255(9093)T-9#)
tErrors.tcFcMsgNumber = "BLF-RPCRS-3"
tErrors.tiFcSeverity = 3
tErrors.tcFcType = "E"
tErrors.tcFcContext = trim(#T-10'This message comes from program/RPCRequestService.p.':255(5142)T-10#)
tErrors.tcFcRowid = string(rowid(tErrors))
oiReturnStatus = -1.
end.
else
if vcApplicationIdRPCRS <> tqSystem.tcSystApplicationId
then do:
create tErrors.
assign tErrors.tcFcMessage = trim(#T-7'The applicationId context property is not correct.':255(9094)T-7#)
tErrors.tcFcMsgNumber = "BLF-RPCRS-4"
tErrors.tiFcSeverity = 3
tErrors.tcFcType = "E"
tErrors.tcFcContext = trim(#T-8'This message comes from program/RPCRequestService.p.':255(5142)T-8#)
tErrors.tcFcRowid = string(rowid(tErrors))
oiReturnStatus = -1.
end.
end.