code: public CompoundActivity addActivity(Activity activity) {
  		if(activity != null) {
  			logger.trace("adding sub-activity '{}' to list", activity.getId());
  			activities.add(activity);
  		}
  		return this;
  	}
docs: Adds an activity to the list of sub-activities.
  
  @param activity
  the sub-activity to add.
  @return
  the activity itself, to enable method chaining.