I was wondering about the status of using scripting languages other than Xtend for writing rules in OH2. The JSR223 wiki page states
Currently this scriptengine cannot be used in OpenHAB2. A new smarthome compatible functionality is in development. Scripts from this engine can be used in the new addon without significant changes. A compatibility layer will be provided.
I noticed from some PRs on the ESH repo and some forum posts that it seems OH2 has an entirely new rule engine which may support JSON definitions of rules and the use of other scripting languages. Is this in the beta release and is there any documentation about it?
What is the correct way to write rules for OH2 using javascript? If I use JSR223 on OH1 will my rules be compatible when I decide to switch to OH2?