protected function executeDependedActions($group)
    {
        $executedCount = 0;
        $continue      = true;
        while ($continue) {
            $continue    = false;
            $hasExecuted = false;
            $hasSkipped  = false;
            reset($this->actions[$group]);
            while (list($index, $action) = each($this->actions[$group])) {
                if ($this->isActionReadyToExecute($action[0], $action[2])) {
                    $executedCount += $this->executeAction($index, $action);
                    unset($this->actions[$group][$index]);
                    $hasExecuted = true;
                    if ($hasSkipped) {
                        // start execution from the begin
                        $continue = true;
                        break;
                    }
                } else {
                    $hasSkipped = true;
                    if ($hasExecuted) {
                        // start execution from the begin
                        $continue = true;
                        break;
                    }
                }
            }
        }

        return $executedCount;
    }