How to programmatically make a process model visible to a role

Hello,

in the MWS administration area, user management, it’s possible to define for a role, which process models are visible to this role in the monitor.

Is it possible (and if yes, how :-)) to add a process model to the list of the processes for a role programmatically? I.e. not via the GUI but rather by the code from a e.g. portlet.

Well, that SHOULD be possible since MWS GUI manages it somehow. But how? Are there any code samples?

Every hint will be much appreciated!