13 Extensibility in Backend Coding
This topic provides an overview of extensibility in back-end coding for the Hook Packages.
Release-specific code has to be written in the Hook Packages generated.
Functions in Hook Packages
- Skip Handler: Pr_Skip_Handler
This can be used to skip the logic written in another release. For Example: logic written in KERNEL release can be skipped in CLUSTER release.
- Fn_post_bulid_type_structure
If any change has to be made in the field values obtained from the form before the start of processing, code can be written here.
- Fn_pre_check_mandatory
- Fn_post_check_mandatory
Any extra mandatory checks on the field values from the screen can be written here.
- Fn_pre_query
- Fn_post_query
Any specific logic while querying can be written in these functions. It is called from fn_query of the main package.
- Fn_pre_upload_db
- Fn_post_upload_db
Any logic while uploading data to tables can be written here.
- Fn_pre_default_and_validate
- Fn_post_default_and_validate
Any release-specific logic for defaulting and validation can be written here. It is called from the fn_default_and_validate in the main package.
Flow of control through Hook packages
Figure 13-1 Flow of control through Hook Packages
Example: For Fn_check_mandatory, flow will be as:
By passing Base Release Functionality
There are auto-generated functions like FN_SKIP_<RELEAE_TYPE> which would determine whether or not a particular hook needs to be called.
The developer also has an option to bypass the base release hook if need be. For example, if the validations are written in STPKS_STDCINF _KERNEL, FN_PRE_CHECK_MANDATORY are not required or not suitable for the Cluster release, the system provides an option to bypass the code written by the Kernel team. Similarly, a Custom release can also bypass the code written by Kernel and Custom Releases. This can be achieved by calling procedures PR_SET_SKIP_<RELEASE_TYPE> and PR_SET_ACTIVATE_<RELEASETYPE>.
These procedures will be made available in the main package and the development teams of Customization teams can use these procedures to skip and re-activate the hooks of parent release. The Developer should avoid adding validations or Checks in the Pre Stage of any function, like Fn_Pre_Check_Mandatory, etc, and should aim to add all the validations in the Fn_Post_Default_and_Validate.
For Example: The flow for the Mandatory Stage for STDCIFD: