This content is part of the Alfresco ADF getting started tutorials and describes how to install Alfresco ECM as Alfresco ADF service layer. Installing Alfresco ECM as Alfresco ADF service layer is quite similar to a standard installation, except for few setup and details. There are three main tasks to follow to set up an Alfresco ECM service layer:
1. Installing Alfresco 5.2+. In this task you are going to install a standard configuration of Alfresco (from version 5.2.c or more recent), Alfresco Share is not required for ADF to run, however it may prove useful for administrative tasks.
2. Enabling CORS on Alfresco ECM. In this task you are going to set up the Alfresco installation to admit requests from outside the domain.
3. Installing REST API Explorer (Optional). In this task you are going to install a simple web application on top of Alfresco, as reference and documentation of the REST services. This task is optional and will help you for a better comprehension of the available services and how the API works.
Below you can find a “step by step” description of each task, assuming you are familiar with Alfresco ECM and its fundamentals.
1. Installing Alfresco 5.2+
In this task you are going to set up a standard instance of Alfresco ECM, paying attention to what is described below:
- Alfresco One 5.2 EA release or newer or Alfresco Community Edition 201611 EA release or newer has to be used.
- It is not required (but admitted) to install Alfresco Share. By default, Alfresco Share is installed using the wizard so you can leave it.
- Alfresco Search Services or Alfresco Solr has to be installed, if you require to execute searches into the repository. By default, Alfresco Solr is installed using the wizard and we suggest to leave it.
The detailed description of the installation of Alfresco ECM is out of the scope of this tutorial, considering that the official documentation is complete for various Operating Systems (Linux and Windows based). If you need support on the Alfresco standard installation, please refer to the Community Portal dedicated to the Alfresco ECM.
Using the Alfresco ADF v1.1.0 LA, if both Activiti BPM and Alfresco ECM are used, is requested to have the same credentials for the two systems. With “same credentials” we mean the same users available in Activiti and Alfresco, with the same username and password. For this purpose, we suggest to create a new user with Administrator’s permits into Alfresco with username firstname.lastname@example.org and admin as password (the default Administrator credentials in Activiti).
2. Enabling CORS on Alfresco ECM
Now that Alfresco is up and running, we need to tell to the server to accept requests coming from the ADF application. The future ADF application will be installed on a different web server and by definition, it will be considered another domain. This can be done by enabling CORS, not admitted by default.
To enable CORS in Alfresco, please follow the steps described below.
- Download the enablecors-1.0.jar from the Alfresco Nexus Repository. Below is described the link.
- Save the enablecors-1.0.jar file in the $ALF_HOME/modules/platform folder.
Please note that, by default, the CORS filter will allow any origin. This setup should be developed differently in a production environment, according with the best practices in terms of security over internet.
3. Installing REST API Explorer (Optional)
Even though other setup wouldn't be required, the Alfresco REST API Explorer could be evaluated to be installed, especially if you are defining a development environment. The Alfresco REST API Explorer gives you an interactive documentation for the Alfresco REST API, through the installation of a simple web application. To make it extremely simple, we will deploy the REST API Explorer directly into the Alfresco’s servlet container (by default Tomcat).
To install the Alfresco REST API Explorer please follow the steps described below.
- Download the api-explorer-1.4.war from the Alfresco Nexus Repository. Below is described the link.
- Save the api-explorer-1.4.war file in the $ALF_HOME/tomcat/webapps folder.
- Restart Alfresco. You’ll be able to reach the REST API Explorer at the link below.
Alfresco REST API Explorer