… you need to select the Script Type from the available ScriptEngineFactories and then enter the actual script into the editor. This action does not read script files and it does not work with rule DSL scripts.
Read through this series of tutorials, but you will be much better off using scripted automation until the UI is built out in OH 3.0…