Hook Packages

The Main Package has designated calls to these Hook Packages for executing any functional checks and Business validations added by the user. The structure for all the Hook Packages are the same, like:
  • Fn_Post_Build_Type_Structure
  • Fn_Pre_Check_Mandatory
  • Fn_Post_Check_Mandatory
  • Fn_Pre_Default_and_Validate
  • Fn_Post_Default_and_Validate
  • Fn_Pre_Upload_Db
  • Fn_Post_Upload_Db
  • Fn_Pre_Query
  • Fn_Post_Query

These Functions are called from the Main package using the Pre and Post Hooks available in the Main Package. The 3 Hook Packages namely Kernel, Cluster and Custom Packages have similar structure and are for the respective teams to work on.

In the Table SMTB_PARAMETERS, the parameter RELEASE_TYPE indicates the deployed release. The system uses this flag to determine the hooks to be called. Depending on the deployed release type system skips calling these hooks.

For examples if the deployed release is Kernel, Cluster and Custom hooks need not be called. Similarly in case the deployed release type is Cluster, system does not call custom hook as it is not needed.

The Complete Flow for a sample function, say Fn_Check_Mandatory is as follows:
  • STPKS_STDCIFCR_MAIN. Fn_Check_Mandatory
  • STPKS_STDCIFCR_CUSTOM.Fn_Pre_Check_Mandatory
  • STPKS_STDCIFCR_CLUSTER.Fn_Pre_Check_Mandatory
  • STPKS_STDCIFCR_KERNEL.Fn_Pre_Check_Mandatory
  • STPKS_STDCIFCR_MAIN .Fn_Sys_Check_Mandatory
  • STPKS_STDCIFCR_KERNEL.Fn_Post_Check_Mandatory
  • STPKS_STDCIFCR_CLUSTER.Fn_ Post_Check_Mandatory
  • STPKS_STDCIFCR_CUSTOM.Fn_ Post_Check_Mandatory

There are auto generated functions like FN_SKIP_<RELEAE_TYPE> which would determine whether or not a particular hooks needs to be called.

Developer also has an option to bypass the base release hook if need be. For example if the validations written in STPKS_STDCIFCR_Kernel.FN_PRE_CHECK_MANDATORY are not required or not suitable for the Cluster release, system provides an option to bypass the code written by 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.