How to use multiple statement inside the watcher transform?

I have to write script inside the watcher transform i.e adding the loop and condition under watcher transform using groovy then how to add multiple statement under transform. while creating it throwing me error [script] can' t be parsed inside script.

there is a chain transform allowing you to do multiple transforms. But if you are just using multiple scripts, it might be faster to put them all in one script.