5.2 Extensibility in Backend Coding
This topic describes about the extensibility in backend coding.
For online forms, generated code does not provide any business logic. Insert statements won’t be present as part of generated code in online packages. Developer has to write the business logic in release specific packages (or make call l to server functions from release specific packages).
- Checking mandatory fields
- Defaulting and validating
- Uploading to db
- Process
- Subsystem pickup
- Enrich
- Product Default
- Query
Note:
The system generated code for uploading; defaulting etc. (fn_sys_default_and_validate, fn_sys_upload_db etc.) won’t be called by the main package in online flow. If it is required, developer has to call it explicitly from release specific packages.In online flow, upload to base tables happens first and processing is done on the inserted data after uploading. After processing, the response type will be build.
Note that in online flow, upload to base tables happens first and processing is done on the inserted data after uploading. After processing, the response type will be build.
Figure 5-1 Flow of control in an Online main package
- Skip Handler : Pr_Skip_Handler
This can be used to skip the logic written in another release.
Example: logic written in KERNEL release can be skipped in CLUSTER release
- Fn Main
This is called form the fn_main in main package.
- Fn_pre_resolve_ref_numbers
- Fn_post_resolve_ref_numbers
This function validates the reference number. It is called from fn_ resolve_ref_numbers of the main package.
- Fn_pre_unlock
- Fn_post_unlock
This function holds the contract level validations and modification logic for existing contract. It is called from fn_unlock of main package.
- Fn_pre_check_mandatory
- Fn_post_check_mandatory
Any mandatory checks can be validated here. It is called from fn_chchk_mandatory of main package.
- 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_product_default
- Fn_post_product_default
This function has the logic to default the values for the contract based on the product maintenance. It is called from fn_product_default of main package.
- Fn_pre_subsys_pickup
- Fn_post_subsys_pickup
This function does the subsystem pickup for the subsystem’s (call form’s) as per product maintenance for the contract. It is called from fn_subsys_pickup of main package.
- Fn_pre_enrich
- Fn_post_enrich
After product default, user can default others values. That logic can be put here. it is called from fn_enrich of main package.
- 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.
- Fn_pre_upload_db
- Fn_post_upload_db
Any logic while uploading data to tables can be written here. It is called from fn_upload_db of main package.
- Fn_pre_process
- Fn_post_process
These hook functions are specific to transaction online form screens. This function should have the call to all the server functions which process the input data for the contract as per the functionality. These are called from fn_process of the main package.
Parent topic: Extensible Development