Setting up your development environment

Metadata actions are implemented as Java classes. Therefore, we need a Java project that produces a jar artifact containing our custom classes. This guide assumes you have a Java project using your favorite build tool loaded in your favorite IDE.

This section provides some more steps for setting up a project for development of custom Alfred Inflow metadata actions.

Dependencies

Since we are developing an Alfred Inflow integration, our project has some dependencies on Inflow.

compileOnly "eu.xenit.alfred.inflow:inflow-parsers:${your-Inflow-version-here}"
compileOnly "eu.xenit.afred.inflow:inflow-datamodel:${your-Inflow-version-here}"

Docker development setup

At some point, we’ll want to test our custom metadata action. If we have a testing environment with Inflow available, we can just use this environment. Another option is setting up Inflow with our metadata actions locally using docker(-compose).

This section describes the steps that need to be taken to setup Alfred Inflow in docker with custom metadata actions.
For more information and example docker-compose templates, please contact Xenit’s Alfred Inflow team.

Alfred Inflow docker image

Alfred Inflow is available as a docker image in which the application is deployed and running in a tomcat application server. The Inflow docker image is available in the Xenit docker repository: docker.xenit.eu/private/alfred-inflow/inflow:${your-Inflow-version-here}

Deploying custom parsers

Let’s suppose the output of our project is a jar file containing the metadata actions we are developing. To make these customizations available inside the docker container, we need to:

  1. Embed our custom jar artifact in the Inflow docker container.
    When using docker-compose, we can specify the jar artifact as a volume:

        volumes:
        - ./build/our-custom-parsers.jar:/tmp/classes/our-custom-parser.jar
    
  2. Configure the Inflow instance to load the metadata actions.
    This is done by the hotdeploy.paths configuration. When using docker-compose, we can easily configure the tomcat running in docker with following environment variable:

        environment:
        - CATALINA_OPTS=-Dhotdeploy.paths=file:/tmp/classes/
    

Mounting data

To test our metadata action, we’ll need to have some test data available in the docker container.

When using docker-compose, we can specify the directory that contains the files we want to upload to Alfresco, as a volume:

    volumes:
    - ./data/:/data/