public Activity getActivityById ( String logicalId ) { for ( Activity activityVO : getActivities ( ) ) { if ( activityVO . getLogicalId ( ) . equals ( logicalId ) ) { activityVO . setProcessName ( getName ( ) ) ; return activityVO ; } } for ( Process subProc : this . subprocesses ) { for ( Activity activityVO : subProc . getActivities ( ) ) { if ( activityVO . getLogicalId ( ) . equals ( logicalId ) ) { activityVO . setProcessName ( getName ( ) + ":" + subProc . getName ( ) ) ; return activityVO ; } } } return null ; }
Also searches subprocs .