save rules and fns as metadata to m2m transformation vars