protected function proceedSubmitRecords(array $changeSet)
    {
        if (is_array($changeSet['submitRecords'] === false)) {
            return;
        }

        foreach ($changeSet['submitRecords'] as $submitRecord) {
            $submitRecordData = array(
                'changeset' => $changeSet['id'],
                'status' => $submitRecord['status'],
            );

            $wherePart = array('changeset' => $changeSet['id']);
            $submitRecordRow = $this->getLookupTableValues(Database::TABLE_SUBMIT_RECORDS, array('id'), $wherePart);
            if ($submitRecordRow === false) {
                $id = $this->getDatabase()->insertRecord(Database::TABLE_SUBMIT_RECORDS, $submitRecordData);

            } else {
                $id = $submitRecordRow['id'];
                $this->getDatabase()->updateRecord(Database::TABLE_SUBMIT_RECORDS, $submitRecordData, $submitRecordRow['id']);
            }

            $submitRecord = $this->unsetKeys($submitRecord, array('status'));

            if (is_array($submitRecord['labels']) === true) {
                $this->proceedSubmitRecordLabels($id, $submitRecord['labels']);
                $submitRecord = $this->unsetKeys($submitRecord, array('labels'));
            }

            $this->checkIfAllValuesWereProceeded($submitRecord, 'Submit record');
        }
    }