public function updateState($state, $preserveState = true)
    {
        $newState = $state;
        if ($preserveState) {
            $newState = $state->deepClone();
        }

        /** @var $operation Operation */
        foreach ($this->operations as $operation) {
            $operation->setAppLabel($this->getAppLabel());
            $operation->updateState($newState);
        }

        return $newState;
    }