Skip to content

Distributed using Axon Server Event Bus only

This example is demonstrating the usage of the Polyflow components distributed with help of Axon Server. It provides two applications for demonstration purposes: the process application and the process platform. Both applications are built as SpringBoot applications.

The following configuration is used in the distributed scenario with Axon Server:

  • Bus distribution is provided by Axon Server Connector (event bus only)
  • Polyflow Core Components (task pool and data pool) are deployed aside the process application
  • Axon Server is used as Event Store
  • Postgresql is used as a database for:
    • Camunda BPM Engine
    • Process Application Datasource
  • JPA is used as persistence for projection view (view-jpa)

System Requirements#

  • JDK 11
  • Docker
  • Docker Compose

Preparations#

Before you begin, please build the entire project with mvn clean install from the command line in the project root directory.

You will need some backing services (Axon Server, PostgreSQL) and you can easily start them locally by using the provided docker-compose.yml file.

Before you start change the directory to examples/scenarios/distributed-axon-server-local-polyflow and run a preparation script .docker/setup.sh. You can do it with the following code from your command line (you need to do it once):

cd examples/scenarios/distributed-axon-server-local-polyflow
.docker/setup.sh

Now, start required containers. The easiest way to do so is to run:

docker-compose up -d

To verify it is running, open your browser http://localhost:8024/. You should see the Axon Server administration console.

Start#

The demo application consists of several Maven modules. In order to start the example, you will need to start only two of them in the following order:

  1. process-platform-view-only (process platform)
  2. process-application-local-polyflow (example process application)

The modules can be started by running from command line in the examples/scenarios/distributed-axon-server-local-polyflow directory using Maven or start the packaged application using:

java -jar process-platform-view-only/target/*.jar
java -jar process-application-local-polyflow/target/*.jar

Useful URLs#

Process Platform#

Process Application#