Hi Maciej,
Since we can make sure that sub process instance is alway a 'ProcessInstance' type, why not use 'ProcessInstance' type as the return type of getSubProcessInstance() ?
I think this is more meaningful.
ProcessInstance getSubProcessInstance();