You can add logging to the script. Add some to see whether or not the transform in question is even being invoked.
The JavaScript Transformation no longer exists in OH 4. In fact, if you have it in use somewhere you’ll see a warning in the log about that. Did you recode the transformation to be compatible with ECMAScript 11? The JS Transformation used Nashorn ECMAScript 5.1 and there might be incompatabilities.
There isn’t. It’s part of core and will work with an Rules language you have installed.