Script Nodes in process apps

How to use and work with script nodes in process apps (beta version) ? I have tried to implement it but it’s throwing some error. Wanted to know how to define variables, define logic and use the variables defined in script node outside of it. I have referred to official KORE.AI documentation, but it is too generic. Is there any other specific material or references or examples on how to implement script nodes in process apps (beta version) ??