Practical implementation techniques and guidance for delivering business solutions with Alfresco
- Deep practical insights into the vast possibilities that exist with the Alfresco platform for designing business solutions.
- Each and every type of business solution is implemented through the eyes of a fictitious financial organization – giving you the right amount of practical exposure you need.
- Packed with numerous case studies which will enable you to learn in various real world scenarios.
- Learn to use Alfresco’s rich API arsenal with ease.
- Extend Alfresco’s functionality and integrate it with external systems.
Planning document migration
Now we have got a strategy for how to do the document migration and we have several import methods to choose from, but we have not yet thought about planning the document migration. The end users will need time to select and organize the files they want to migrate and we might need some time to write temporary import scripts. So we need to plan this well ahead of production day.
The end users will have to go through all their documents and decide which ones they want to keep and which ones they will no longer need. Sometimes the decision to keep a document is not up to the end user but instead might be controlled by regulations, so this requires extra research
The following screenshot shows the Best Money schedule for document migration:
It is not only electronic files that might need to be imported, sometimes there are paper-based files that need to be scanned and imported. This needs to be planned into the schedule too.
Implementing document migration
So we have a document migration strategy and we have a plan. Now let’s see a couple of examples of how we can implement document migration in practice.
Using Alfresco bulk filesystem import tool
A tool such as the Alfresco bulk filesystem import tool is probably what most people will use and it is also the preferred import tool in the Best Money project. So let’s start looking at how this tool is used. It is delivered in an AMP and is installed by dropping the AMP into the ALFRESCO_HOME/amps directory and restarting Alfresco.
However, we prefer to install it manually with the Module Management Tool (MMT) as we have other AMPs, such as the Best Money AMP, that have been installed with the MMT tool.
Copy the alfresco-bulk-filesystem-import-0.8.amp (or newest version) file into the ALFRESCO_HOME/bin directory. Stop Alfresco and then install the AMP as follows:
C:Alfresco3.3bin> java -jar alfresco-mmt.jar install alfresco-
Running Alfresco bulk import tool
Remove the ALFRESCO_HOME/tomcat/webapps/alfresco directory, so the files contained in the new AMP are recognized when the updated WAR file is exploded on restart of Alfresco.
The tool provides a UI form in Alfresco Explorer that makes it very simple to do the import. It can be accessed via the http://localhost:8080/alfresco/service/bulk/import/filesystem URL, which will display the following form (you will be prompted to log in first, so make sure to log in with a user that has access to the spaces where you want to upload the content):
Here, the Import directory field is mandatory and specifies the absolute path to the filesystem directory from where to load the documents and folders from. It should be specified in an OS-specific format such as for example C:docmigrationmeetings or /docmigration/meetings. Note that this directory must be locally accessible to the server where the Alfresco instance is running. It must either be a local filesystem or a locally mounted remote filesystem.
The Target space field is also mandatory and specifies the target space/folder to load the documents and folders into. It is specified as a path starting with /Company Home. The separator character is Unix-style (that is, “/”), regardless of the platform Alfresco is running on. This field includes an AJAX auto-suggest feature, so you may type any part of the target space name, and an AJAX search will be performed to find and display matching items.
The Update existing files checkbox field specifies whether to update files that already exist in the repository (checked) or skip them (unchecked).
The import is started by clicking on the Initiate Bulk Import button. Once an import has been initiated, a status Web Script will display that reports on the status of the background import process. This Web Script automatically refreshes every 10 seconds until the import process completes.
For the Best Money project, we have set up a staging area for the document migration where users can add documents to be imported into Alfresco. Let’s import the Meetings folder, which looks as follows, in the staging area:
One Committee meeting has been added and that is what we will test to import with the tool. Fill out the Bulk Import form as follows
Click Initiate Bulk Import button to start the import. The form should show the progress of the import and when finished we should see something like this:
In this case, the import took 9.5 seconds and 31 documents (totaling 28 MB) were imported and five folders created. If we look at the document nodes, we will see that they all have the bmc:document type applied and the bmc:documentData aspect applied. This is accomplished by a type rule which is added to the Meetings folder. All documents also have the cm:versionable aspect applied via the “Apply Versioning” rule, which is added to the Meetings folder.