A M2MImportRuleset 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 ImportMappingRules are applied.
The post-process JSFunction is executed by the M2M Engine at the end of the transformation, just after the ImportMappingRules 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 M2MImportRuleset via the Dependencies preProcessRuleset and postProcessRuleset
To proceed, right-click on the M2MImportRuleset, and click on Add new | M2M | preProcessRuleset or Add new | M2M | postProcessRuleset:
After clicking, a dialog window is displayed to select the JSFunction as pre-process or post-process:
Once the M2MImportRuleset is linked to its pre-process and post-process JSFunctions, it looks like below: