public Process getSubProcessVO ( Long id ) { if ( this . getId ( ) != null && this . getId ( ) . equals ( id ) ) // Id field is null for instance definitions return this ; if ( this . subprocesses == null ) return null ; for ( Process ret : subprocesses ) { if ( ret . getId ( ) . equals ( id ) ) return ret ; } return null ; }
returns the process VO identified by the passed in work id It is also possible the sub process is referencing self .