openHAB 3 notification rules/scripts

The first question is what is driving you to do this? There is no reason you need to abandon your .rules files unless there is some compelling reason. So make sure you are going though this extra work for some reason beyond “because I can.” It might be as simple as you want to be able to manage your Rules through MainUI.

This is not and probably never will be possible using Rules DSL. This is possible using JavaScript or Python. To see how to do it in JavaScript see OH 3 Examples: Writing and using JavaScript Libraries in MainUI created Rules.