public function getRootQueue()
{
if ($this->is_initial) {
return $this;
}
$root = array();
foreach (QueueOutcome::model()->findAllByAttributes(array('outcome_queue_id' => $this->id)) as $qo) {
$q = $qo->queue->getRootQueue();
$root = $this->mergeRootQueues($root, $q);
}
if (count($root) == 1) {
return $root[0];
}
return $root;
}