Generate Rule with transform function