Hi Georg,
Right now an external process (a process defined in an external module) cannot define custom methods. This is going to change very soon, when I release the next version 1.1 of PCL (the PCL version that ships with 1.6.0 is a transitional release while I finish PCL 1.1).
Custom process methods will be accessible from the JavaScript runtime, just as you have described them, that is just as methods are accessible for core JavaScript objects.
You can however use the current process parameter support to implement custom process properties. Just define one or more parameters that you can use to communicate with your scripts. All process parameters are automatically exposed to PJSR before and after executeOn() and executeGlobal(). Naturally, if you change the values of your instance's parameters in your C++ implementation, the updated values will be visible from JavaScript.