public function process(LazaretSession $session, File $file, $callable = null, $forceBehavior = null, $nosubdef = false)
    {
        $visa = $this->getVisa($file);

        // Generate UUID
        $file->getUUID(true, false);

        if (($visa->isValid() || $forceBehavior === self::FORCE_RECORD) && $forceBehavior !== self::FORCE_LAZARET) {

            $this->addMediaAttributes($file);

            $element = $this->createRecord($file, $nosubdef);

            $code = self::RECORD_CREATED;
        } else {

            $element = $this->createLazaret($file, $visa, $session, $forceBehavior === self::FORCE_LAZARET);

            $code = self::LAZARET_CREATED;
        }

        // Write UUID
        $file->getUUID(false, true);

        if (is_callable($callable)) {
            $callable($element, $visa, $code);
        }

        return $code;
    }