Giter VIP home page Giter VIP logo

activiti-sdk's Introduction

Activiti SDK v1.0.5

The Activiti SDK based on Apache Maven, includes support for rapid and standard development, testing, packaging, versioning and release of your Activiti integration and extension projects.

DevOps Engineers and System Administrators can consider to use our Activiti Deployment template in order to deploy the entire Activiti platform.

The project consists of the following Maven submodules:

  • Activiti extensions JAR (activiti-extensions-jar): put here your Java extensions
  • Activiti App Overlay WAR (activiti-app-overlay-war): generate activiti-app WAR overlay with Activiti Extensions JAR embedded
  • Activiti Rest Overlay WAR (activiti-app-rest-overlay-war): generate activiti-rest WAR overlay with Activiti Extensions JAR embedded
  • Activiti Admin Overlay WAR (activiti-admin-overlay-war): generate activiti-admin WAR overlay
  • Activiti Overlay Docker (activiti-app-overlay-docker): put your overlayed WARs into the Docker containers
  • Activiti Integration Tests (activiti-integration-tests): integration tests
  • Activiti Rest Swagger Client (activiti-swagger-client): generate the Activiti Rest Java Swagger client (separated project)

Capabilities

  • Full support of Arm64 CPUs (Apple Silicon M1) with native Docker containers
  • Running Docker will also create persistent volumes for each storage component (contentstore, db) for making the development approach in Activiti consistent and reliable

Prerequisites

  • OpenJDK 11
  • Apache Maven 3.8.6
  • Docker (optional using mvn clean install -DskipITs)
  • Add the following snippet in your /<USER_HOME>/.m2/settings.xml for enabling the Docker Maven Plugin provided by fabric8:
<settings>
... 
	<pluginGroups>
		<pluginGroup>io.fabric8</pluginGroup>
	</pluginGroups>
...
</settings>

Quickstart

Full Maven lifecycle command:

  • mvn clean install docker:build docker:start

Endpoints available:

  • http://localhost:8080/activiti-app (default user: admin/test)
  • http://localhost:8081/activiti-rest (default user: admin/test)
  • http://localhost:9090/activiti-admin (default user: admin/admin)

Default logging configuration:

  • Activiti App -> /usr/local/tomcat/logs/activiti-app.log
  • Activiti Rest -> /usr/local/tomcat/logs/activiti-rest.log

Default debug ports:

  • Activiti App -> 8888
  • Activiti Rest -> 9999

Stop all the Docker containers with:

  • mvn docker:stop

Considering that the Activiti Admin should be built just once, you can skip the build and packaging process for it (WAR and Docker container) with the skip.admin Maven profile as the following:

  • mvn clean install docker:build docker:start -Pskip.admin

Activiti Extensions JAR Module

Folder structure is based on the Activiti project classpath:

  • org.activiti.app.extension.conf: put here your custom configuration classes for Activiti App
  • org.activiti.app.extension.bean: put here your custom Spring beans (delegates etc.) for Activiti App
  • org.activiti.rest.conf: put here your custom Spring beans (delegates etc.) for Activiti Rest
  • classpath:activiti-custom-context.xml: put here your custom Spring context for Activiti Rest
  • /activiti-extensions-jar/src/test/resources/apps: contains your own Activiti applications extracted
  • /activiti-extensions-jar/src/test/java: put here your unit and integration tests

To run use mvn clean install -DskipITs

  • Runs the embedded container + H2 DB
  • Runs unit tests with mvn clean test
  • Creates JAR extensions

SDK Packages - Runtime - Cross platform

  • org.activiti.rest.service.api: put here your enterprise custom REST endpoint (authentication required)

Suggested naming conventions for implementations dedicated to a specific app

  • org.activiti.extension.*your_app*.listeners: put here your listeners
  • org.activiti.extension.*your_app*.service.tasks: put here your service tasks

SDK Packages - Embedded Test Runtime

  • org.activiti.unit.tests: put here your unit test (with suffix *Test.java)

Activiti App WAR Overlay Module

This module is responsible for generating the final activiti-app.war artifact including all the extensions implemented in the Activiti extensions JAR Module.

Activiti Rest WAR Overlay Module

This module is responsible for generating the final activiti-rest.war artifact including all the extensions implemented in the Activiti extensions JAR Module.

Activiti Admin WAR Overlay Module

This module is responsible for generating the final activiti-admin.war artifact including the external configuration.

Activiti Overlay Docker Module

For building the Docker container with your custom Activiti WARs:

mvn docker:build

Packaging of Activiti App Docker containers with extensions

mvn docker:build docker:start

Start your Activiti Docker containers with the following architecture:

  • PostgreSQL

  • activiti-db-volume: Docker volume for the database of Activiti Engine

  • activiti-admin-db-volume: Docker volume for the database of Activiti Admin

  • activiti-contentstore-volume: Docker volume for attachments

  • Stop your Docker container:

mvn docker:stop

  • Purge all the Docker volumes:

mvn clean -Ppurge

Activiti Integration Tests Module

This module includes tests for interacting with the Activiti Platform on Docker using Http Client 5.

Put your Java test classes in the following package: /activiti-integration-tests/src/test/java

Building your Docker container (optional)

Update if you need the following configuration files:

  • activiti-app-log4j.properties in /activiti-docker-overlay/src/main/docker/logging
  • activiti-rest-log4j.properties in /activiti-docker-overlay/src/main/docker/logging
  • activiti-app.properties in /activiti-overlay-docker/src/main/docker/config
  • activiti-admin.properties in /activiti-overlay-docker/src/main/docker/config
  • activiti-rest.properties in /activiti-overlay-docker/src/main/docker/config/rest
  • engine.properties in /activiti-overlay-docker/src/main/docker/config/rest
  • setenv.sh in /activiti-overlay-docker/src/main/docker/config

All the Dockerfiles are available in /activiti-overlay-docker/src/main/docker/config:

  • Dockerfile-app build the Activiti App WAR
  • Dockerfile-rest build the Activiti Rest WAR
  • Dockerfile-admin build the Activiti Admin WAR

Few things to notice

  • No parent pom
  • Standard JAR, WAR packaging with also Docker container generation
  • Works seamlessly with any IDE
  • Test your extensions with a consistent Activiti architecture running with Docker volumes

Sponsorship

This project was created with the sponsorship of Confcommercio Venezia CAF S.r.l.

Contributors

Enterprise support

Official maintenance and support of this project is delivered by Zia Consulting

activiti-sdk's People

Contributors

openpj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.