INSERT { Groovy fields, methods, inner classes }
The INSERT directive may appear at most once.
If necessary, you can avoid using the built-in features and write the entire set of mapping rules in Groovy or some other language. If a mapping rules file is specified as a file name ending in '.groovy', then control is given to that script once for each file, exactly as if there was one mapping rule of the form:
WHEN true { contents of script file }