scope = _management.getScopeInfoWithActivity(lastInstance().getRootScope().getSiid(), true).getScopeInfo();
if (recoveries == null)
recoveries = new ArrayList<TActivityInfo>();
TScopeInfo.Activities activities = scope.getActivities();
for (int i = 0; i < activities.sizeOfActivityInfoArray(); ++i) {
TActivityInfo activity = activities.getActivityInfoArray(i);
if (activity.getStatus() == TActivityStatus.FAILURE) {
assertNotNull(activity.getFailure());
recoveries.add(activity);
} else
assertNull(activity.getFailure());
}
for (TScopeRef ref : scope.getChildren().getChildRefList()) {
TScopeInfo child = _management.getScopeInfoWithActivity(ref.getSiid(), true).getScopeInfo();
if (child != null)
getRecoveriesInScope(instance, child, recoveries);