Alfresco Process Services is an enterprise Business Process Management (BPM) solution which is powered by the high performance open-source business process engine based on Activiti. Alfresco Process Services provides a powerful suite of end user tools and can integrate with a enterprise systems such as Alfresco Content Services, Box and Google Drive.
When customizing, overriding, or creating new logic in Alfresco Process Services, it is useful to be able to develop against the relevant Maven modules. But there is no documentation of how/which modules to refer when developing custom or creating new logic in Alfresco Process Services maven project. So the main focus of this blog will be on the various maven modules available and how to configure a maven project to use those modules.
Alfresco Process Services Maven Modules
The group Id of all the Alfresco Process maven modules is com.activiti and the version of the artifact is the release version of Process Services (at the time of writing latest version is 1.9.0). The
-
-
activiti-app-model : It contains the domain objects, annotated with JPA annotations (used in mapping java objects to the database tables, columns etc.) for persistency and various Spring repositories for executing the actual database operations. Also has the Java pojos of the JSON representations that are used for example as responses by the REST endpoints.
-
-
-
activiti-app-logic : It contains the services (RuntimeService, RepositoryService, HistoryService, ManagementService and actual BPM Suite logic.
-
-
-
activiti-app-rest : Contains the REST endpoints that are used by the UI and the public API.
-
-
-
activiti-app-dependencies : Contains all the Alfresco Process Services dependencies. It is also a convenient Maven module (packaging type is pom) for development.
-
-
-
activiti-app : Contains configuration classes.
-
-
activiti-app-root: Contains the root pom. Do not use this for development.
Configuring Maven to connect to the Alfresco Process Maven modules repositories
In order to be able to use the above mentioned modules in your maven project, your local maven needs to be able to access those repositories. So firstly you need to add correct repositories in your maven’s settings.xml. The settings.xml is located in $MAVEN_INSTALL_DIRECTORY/conf/ and the following needs to be added under the <servers> section as shown below.
<servers>
<server>
<id>activiti-enterprise-releases</id>
<username>Username</username>
<password>Pass</password>
</server>
<server>
<id>activiti-enterprise-snapshots</id>
<username>Username</username>
<password>Pass</password>>
</server>
<server>
<id>activiti-thirdparty</id>
<username>Username</username>
<password>Pass</password>
</server>
<server>
<id>alfresco.release.repo</id>
<username>Username</username>
<password>password</password>
</server>
</servers>
Note
You need to replace the username and password with your credential to access the Alfresco Private Repository.
Maven Project Pom
And the last step is to make sure that the correct repositories are being referred in your maven project pom.xml under the <repositories> section. See below excerpt from sample pom.xml.
<repositories>
<repository>
<id>alfresco.release.repo</id>
<releases>
<enabled>true</enabled>
</releases>
<name>Alfresco Enterprise Release</name>
<url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-enterprise-releases/</url>
</repository>
<repository>
<id>activiti-enterprise-snapshots</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Activiti Enterprise Snapshots</name>
<url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-enterprise-snapshots</url>
</repository>
<repository>
<id>activiti-thirdparty</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Activiti thirdparty Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-thirdparty</url>
</repository>
</repositories>
Conclusion
Alfresco also provides activiti-app-embedded-example maven project which show how the Alfresco Process Services app can be included in an existing or other application by referencing the correct Maven dependencies and adding the necessary Spring configuration beans. The above described configurations are required to start that activiti-app-embedded-example maven project. This concludes this blog and hope it provided a good insight of how/which maven modules to use when using/building Alfresco Process Services maven projects.