Example: custom front call (BDL)
Overloading the default standard.feInfo("feName")
front
call.
Front call implementation for standard.feInfo("feName")
In this function, a call to the
standard.feInfo("feName")
is implemented and other front calls are left unprocessed
(notProcessed()). If an error is encountered, the
front call chain stops and the error is returned to the DVM. Several errors can be returned in the
answer object such as: ggc.FrontCallAnswer.moduleNotFound()
ggc.FrontCallAnswer.functionNotFound()
ggc.FrontCallAnswer.stackError()
ggc.FrontCallAnswer.userError(errorMessge STRING)
FUNCTION customFrontCall(request ggc.FrontCallRequest INOUT) RETURNS ggc.FrontCallAnswer
DEFINE answer ggc.FrontCallAnswer
DISPLAY "MODULE: ", request.getModuleName()
DISPLAY "FUNCTION: ", request.getFunctionName()
DISPLAY "Parameter: ", request.getParameterValue(1)
CALL answer.notProcessed()
IF request.getModuleName() == "standard" AND request.getFunctionName() == "feinfo" THEN
IF request.getParameterCount() == 0 THEN
CALL answer.stackError()
ELSE
IF request.getParameterValue(1) == "fename" THEN
IF request.getParameterCount() != 1 THEN
CALL answer.stackError()
ELSE
CALL answer.success()
CALL answer.returnString("MYGBC")
END IF
END IF
END IF
END IF
RETURN answer.*
END FUNCTION