All about check in and out

One of the fundamental differences between SeedDMS and a regular file system is its foremost purpose to store documents and all its versions for a long time and prohibiting any manipulation by unprivileged users. There is little focus on changing the content of the documents. Actually, the DMS itself doesn’t even support editing documents. Besides that, there are way too many different file formats to be supported, which is of course not achievable.

Downloading and uploading

Nevertheless, not all documents stay unchanged for ever and users will sooner or later demand a way to modify the documents stored in SeedDMS. The most obvious workflow to do that would be to

  1. download the document
  2. modify it with software installed on the local computer and
  3. upload it as a new version

It’s fine to do that once in a while, but it’s quite a cumbersome process for many documents. It also bears some risks after the document was downloaded. Some other user may decide to do just the same thing and downloads the document too. If both modify the document and upload it at a later point in time, the second uploader will overwrite the changes of the first uploader. The longer a user waits with uploading his/her version, the higher the risk somebody else modifies and uploads the document earlier. One could lock the document after downloading and unlock it after uploading, but that makes the process even more cumbersome. Users will probably tend to keep the time for modifying the document as short as possible, but that doesn’t solve the problem completely and there are changes to a document, which just need some time to be accomplished. Not to mention, that each upload will create a new version. Anyway, there are situations when this just works perfectly, e.g. if there are just a few users modіfying documents and those users also cooperate in some way outside the DMS, to prevent overwriting changes.

WebDAV

If that way of editing documents in SeedDMS is too complicated and risky why not just access the document with WebDAV and modify the document right in place without downloading nor uploading? Thought, that sounds like a great idea at first sight, but it comes with other disadvantages. Let’s say you open that document with your favorite office application, fix a typo and save it again. Well, you just created a new version. Next you rephrase a sentence and save it again. You just created the next version. So, better don’t save too often and do several modifications before you save the next time. But, your app did an auto save in between and created the next version. You may not bother about the new versions, but what if that initial version had a reviewer or/and approver. All the new versions will be released right away. Hence, accessing the document in place is only in some rare cases an option.

The solution

The solution offered by SeedDMS is a separate check out directory on the server where documents are being copied to (checked out) for editing. Once the user has finished editing the document it is moved back (checked in) which is much like uploading a new version. During the time the document is checked out, users will see a message on the documents details page, if those users are allowed to check out the document himself.

Checking out documents needs to be configured in the settings. First of all a checkout directory on the server must be set. This can be any directory on the server, but quite often it is below the data directory e.g. /var/www/seeddms/data/userdirѕ/%s/. The %s in the path stands for the login name of the user to give each user his own directory. Documents copied into the checkout directory will be named <doc-nr>-<version>-<doc-name>.<extension> to ensure a unique name. The <doc-name> is created from the document name by applying various character substitutions to make it a valid file name.

A document copied to the checkout directory can stay there as long as needed with any impact on the corresponding document in SeedDMS. But how can it be accessed by the user? Well, that’s mostly up to the administrator of the server, who has to setup any service to access the files from remote, e.g. nfs, or cifs. If that is not an option, you should have a look at the SeedDMS extension webdav_checkout. It implements a WebDAV server exclusively for the checkout directory. The extension is available at https://github.com/SeedDMS/webdav_checkout

After installing the extension you should have a look at the file README.md shipped with the extension. It explains in more detail how to configure the extension. Once it is configured you can access your checked out files with any WebDAV Client.