M2MExportRuleset pre-process and post-process modeling

A M2MExportRuleset can be extended by pre-process and post-process JSFunctions. The pre-process JSFunction is executed by the M2M Engine at the beginning of the transformation, just before the ExportMappingRules are applied. The post-process JSFunction is executed by the M2M Engine at the end of the transformation, just after the ExportMappingRules are applied.

The JSFunction used as pre-process or post-process must not have any arguments, and if it returns a Variable, it will not be used by the M2M Engine. These JSFunction must be linked to the M2MExportRuleset via the Dependencies preProcessRuleset and postProcessRuleset
To proceed, right-click on the M2MExportRuleset, and click on Add new | M2M | preProcessRuleset or Add new | M2M | postProcessRuleset:

add pre-process

After clicking, a dialog window is displayed to select the JSFunction as pre-process or post-process:

link pre-process link pre-process

Once the M2MExportRuleset is linked to its pre-process and post-process JSFunctions, it looks like below:

M2MExportRuleset linked to its pre-process and post-process JSFunctions