/**
  * @param form_persistentdocument_baseform $document
  * @param Integer $parentNodeId Parent node ID where to save the document (optionnal => can be null !).
  * @return void
  */
 protected function preSave($document, $parentNodeId = null)
 {
     if ($document->getFormid() === null) {
         $document->setFormid(uniqid('formid_'));
     }
     if ($document->getAcknowledgment()) {
         $notification = $document->getAcknowledgmentNotification();
         if ($notification === null) {
             $this->createacknowledgmentNotification($document);
         }
     }
 }