project BLF > include tFcCloseAndStopInstance.i
Description
Combine FcCloseInstanceCommunication.i and FcStopInstance.i.
When both includes are needed, this include will give performance improvement in a stateless setup,
by skipping the last SaveState.
include parameters
&CLASS | class short name |
&ERROR-STATEMENT | Action to take when an error occurred. |
Internal usage
BLF
QadFinancials
include code
&IF "{&CLASS-REF}" = ""
&THEN
run StopInstance in vh{&CLASS}Inst
(input (if vlFcStateless then "delete":U else ""),
input "",
input "",
input no,
output viFcIncludeReturn).
delete procedure vh{&CLASS}Inst.
assign vh{&CLASS}Inst = ?
vi{&CLASS}Id = 0.
if viFcIncludeReturn < 0
then do:
assign oiReturnStatus = viFcIncludeReturn.
&IF "{&ERROR-STATEMENT}" = ""
&THEN
return ?.
&ELSE
{&ERROR-STATEMENT}
&ENDIF
end.
&ELSE
run StopInstance in vh{&CLASS-REF}Inst
(input (if vlFcStateless then "delete":U else ""),
input "",
input "",
input no,
output viFcIncludeReturn).
delete procedure vh{&CLASS-REF}Inst.
assign vh{&CLASS-REF}Inst = ?
vi{&CLASS-REF}Id = 0.
if viFcIncludeReturn < 0
then do:
assign oiReturnStatus = viFcIncludeReturn.
&IF "{&ERROR-STATEMENT}" = ""
&THEN
return ?.
&ELSE
{&ERROR-STATEMENT}
&ENDIF
end.
&ENDIF