Gateway Framework (Perl): Customized RULE
zakibakar 270003NA2J Visits (1995)
Generally Gateway Framework works with three different
engines. The processes involved in Gateway starts are :
The Parser Engine and Post-Parser Engine consist of set of RULEs to process the files. For example, at Parser Engine, GENERIC_CSV_GATEWAY rule may be used to process CSV data format. At Post-Parser Engine, the parsed files may be further joined and accumulated with JOIN and ACCUMULATE rules. The following are how each rule is referred:
RULE_TYPE => ‘GEN
which tells the engine ( Parser Engine in this case ) to refer to the GENERIC_CSV_GATEWAY rule.
The Gateway Framework is modularized in 3 different components:
When processing a specific rule, the Gateway Framework will
look for the respective Perl’s module in these components. Thus, for example
above, the Perl’s module are the GENE
When processing a rule, Gateway Framework will look for the Perl’s modules starting from Gateway Configuration, followed by Vendor Gateway and Gateway Framework. Failure to return with required rules will cause the Gateway terminated with error.
Users are not encouraged to modify the pre-defined rules in Vendor Gateway and Gateway Framework. Customization is possible by defining the rule(s) within the Gateway Configuration. The structure of config directory will looks like follow:
where the customize rule is to be stored into the parsersrc.
Simple customization can be as simple as copying and modifying the existing rule into parsersrc directory. However, this will leads to confusion during support. It is recommended to have a unique name for the rule. To have this works, other than changing the file’s name, the package name needs to be correctly defined in the new file. For example if the customized rule is named as MY_RULE, the MY_RULE.pm need to have the following defined:
Finally, the RULE is ready to be used by referring it at UserConfig.pm or EngineConfig.pm.
RULE_TYPE => ‘MY_RULE’,