Alfresco Process Services SDK Maven Module

cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Process Services SDK Maven Module

openpj
Moderator
Moderator
5 8 8,857

Five months ago I published the Alfresco Process Services SDK on my GitHub account, this module is dedicated to create extensions for APS in a consistent way. 

The idea behind this contribution started for these two reasons:

  • Help attendees during official APS courses to better understand the platform
  • Help developers to quickly extend APS with new services and components

As an Alfresco Certified Instructor I have created and used this module during the sessions about APS held at the last Alfresco DevCon 2019 in Edinburgh. Using this SDK you can implement your own Java components and you can also build unit and integration tests for consolidating the overall solution.

This could be a good starting point for building your projects for giving it a minimum of quality needed to every customer. In TAI Solutions we are using this module also for building solutions for our customers and it seems that it is working very well 

Currently the SDK is configured for APS 1.9.0.3 but it was tested also on APS 1.8 and 1.9. The structure of this module is strongly based on the current APS 1.x source code packaging, so if you know something about APS classpath, you should feel at home 

Capabilities

Developers can implement their own solutions on top of Alfresco Process Services with the following supported features:

  • Runs the embedded container + H2 DB

  • Runs unit and integration tests

  • Packages both App ZIP and JAR with customization

  • All the APS Java Services supported (UserService, GroupService, TenantService and so on...)

  • No parent pom

  • Standard JAR packaging and layout

  • It works seamlessly with any Maven-compliant IDE

Prerequisites

  • JDK 1.8

  • Apache Maven 3.x (where x should be the latest version)

  • Enterprise Maven Repo Account: an active account for the Alfresco Maven Enterprise Repository to have access to the Enterprise artifacts. If you are an Alfresco Partner or an Alfresco Customer, you can raise a ticket in the Alfresco Support Portal asking for your own account credentials

Please let me know if you are interested to contribute on this project and any feedback is welcome.

More details are available in this post in my personal blog.

Hope this helps

Alfresco Process Services SDK - Github location

Alfresco Process Services SDK - Maven Module

About the Author
Solution Architect AIIM Professional Member Certified Alfresco Instructor / ACE / ACA Mentor, PMC Member and Committer @ Apache Software Foundation Author @ Packt Publishing Project Leader @ JBoss Community
8 Comments
jigir_shah
Active Member

Nice Blog.

@openpj 

I would like to have SDK of Alfresco Process Services with Docker compose, like we have SDK 4.2 for ACS 6.x docker based version.

Can you please help me out to get SDK which starts APS usig docker-compose?

 

Thanks,

Jigir Shah

 

openpj
Moderator
Moderator

Hi Jigir,

thank you for your interest in the APS SDK, I have just added a new issue on github for tracking this improvement:

https://github.com/OpenPj/alfresco-process-services-project-sdk/issues/2

I also added some hints about how to add support for Docker.

I'm familiar with the docker-maven-plugin and it could be the best choise.

Please let me know if you want to work on this, in this case, you can fork the project and contribute on your branch, then I can merge your pull request.

Anyway we could work together on this Smiley Very Happy

jigir_shah
Active Member

Sure @openpj 

I can start working on this whenever I get time. Could you please guide me on How and What should I start with? Any simple steps to create SDK like structure?

jpotts
Professional

I have created a project structure that:

  * Creates a custom Docker image based on the APS image plus the project's extension JAR

  * Implements a simple extension JAR that includes an API endpoint and a Java delegate in their own package namespace instead of Activiti's

  * Uses docker compose to start up the custom image, elasticsearch, and postgres

  * Uses Maven and a run.sh script with the same options as the ACS SDK project (build_start, purge, tail, etc)

  * Resembles the ACS SDK project structure

What remains left to do is:

  * Automatically deploying the APS App

  * Provide example integration tests that exercise the API endpoint and the example process

  * Additional utility scripts for doing things like downloading the updated app from the running APS container or uploading an app into a running container

If this is interesting to anyone I can put it on GitHub as a separate project or on a branch in PJ's project.

jigir_shah
Active Member

Thank You @jpotts 

I have created a SDK Project for APS and it's running fine. However, I am facing only one issue. I have added COPY command to Dockerfile for putting APS license inplace at /root/.activiti/enterprise-license. 

But, this file is not being copied at that location and when I try to look into APS Docker image, I am not able to find that path. Can you please help how can I achieve this?

 

-Jigir

jpotts
Professional

I use a volume in my docker-compose.yml file to map the license file from my local host to the container:

volumes:
- "~/.activiti/enterprise-license:/root/.activiti/enterprise-license/:ro"
- custom-aps-aps-volume:/usr/local/data/

But if you want to use a COPY command in your Dockerfile, that should work too. Unfortunately, I can't help you debug it without seeing it.

jigir_shah
Active Member

Hi @jpotts 

Yes, I tried adding this volume as well. However, i didn't see volume into container. 

 

After removing container and image, I am able to see license file applied.

 

openpj
Moderator
Moderator

Added Docker support now but I need to add Docker Compose support for volumes, please see the latest version of APS SDK:

https://github.com/OpenPj/alfresco-process-services-project-sdk

Now the project will create an Extensions JAR with WAR and Docker Container with the WAR embedded.

We need to add volumes support and we could have a better SDK.

Please try to contribute on my project I think that it could be a very good starting point.