How to get selected processGroups?

I want to get selected elements (processGroups) from Process Flow Editor by my button.
Like this

I haven’t found something similar in DocableScreen of Process Flow Editor
Can I get it somehow? Or I have to make my own panel with processes?