Watch
1
0
Fork
You've already forked jme-process-archive-example
0
mirror of https://github.com/jme-admin-ch/jme-process-archive-example.git synced 2026-08-17 13:05:04 +00:00
Read-only mirror of https://github.com/jme-admin-ch/jme-process-archive-example — Bundesamt für Informatik und Telekommunikation. Issues & pull requests at the source. Catalog: https://www.opensource.admin.ch/en/softwares/45udib https://www.opensource.admin.ch/en/softwares/45udib
  • Java 97.1%
  • Shell 1.8%
  • HCL 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-30 08:16:50 +02:00
.github/workflows JEAP-7322 Adapted github build workflow 2026-07-30 07:47:57 +02:00
.idea/runConfigurations JEAP-7308: update PAS version 2026-07-24 11:31:36 +02:00
.mvn JEAP-7322: Update Docker images to official repositories 2026-07-30 08:16:50 +02:00
docker JEAP-6510: OSS PAS 2026-07-24 15:23:38 +02:00
docs JEAP-6510: Update links in README and add ARCHIVE-EXAMPLES documentation 2026-07-28 10:58:15 +02:00
jme-process-archive-auth-scs JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
jme-process-archive-events JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
jme-process-archive-inspection-service JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
jme-process-archive-resource-service JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
jme-process-archive-service JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
jme-process-archive-test JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
.gitignore JEAP-7308: update PAS version 2026-07-24 11:31:36 +02:00
.trivyignore JEAP-7308: update PAS version 2026-07-24 11:31:36 +02:00
AGENTS.md JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
CHANGELOG.md JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
CONTRIBUTING.md JEAP-6510: OSS PAS 2026-07-24 15:23:38 +02:00
exclude-patterns.txt JEAP-6510: OSS PAS 2026-07-24 15:23:38 +02:00
LICENSE JEAP-6510: OSS PAS 2026-07-24 15:23:38 +02:00
mvnw JEAP-7308: update PAS version 2026-07-24 11:31:36 +02:00
mvnw.cmd JEAP-7308: update PAS version 2026-07-24 11:31:36 +02:00
pom.xml JEAP-6510: Update artifact group IDs in POM and documentation 2026-07-28 10:49:08 +02:00
publiccode.yml Update version/date in publiccode.yml 2026-07-28 11:09:32 +02:00
README.md JEAP-6510: Update links in README and add ARCHIVE-EXAMPLES documentation 2026-07-28 10:58:15 +02:00
SECURITY.md JEAP-6510: OSS PAS 2026-07-24 15:23:38 +02:00
setPomVersions.sh JEAP-6510: OSS PAS 2026-07-24 15:36:19 +02:00
THIRD-PARTY-LICENSES.md Updating THIRD-PARTY-LICENSES.md 2026-07-28 10:51:01 +02:00

JME Process Archive Example

This project demonstrates how a microservice can use an instance of the jEAP Process Archive Service to archive artifacts automatically when domain events or commands are received.

It contains the following modules:

  • jme-process-archive-events: Builders for the example messages.
  • jme-process-archive-resource-service: A sample domain service that creates artifacts and publishes messages.
  • jme-process-archive-service: An example Process Archive Service instance.
  • jme-process-archive-inspection-service: REST endpoints for inspecting archived objects.
  • jme-process-archive-auth-scs: An OAuth mock server for protected Process Archive Service APIs.
  • jme-process-archive-test: End-to-end integration tests.

The example covers event-carried state transfer, event notification, versioned and unversioned artifacts, JSON and Avro payloads, encryption, multiple artifacts per event, archive conditions, backfill, and archive inspection. See ARCHIVE-EXAMPLES.md for the detailed feature descriptions and step-by-step examples.

Changes

This project is versioned using Semantic Versioning, and all changes are documented in CHANGELOG.md following the format defined by Keep a Changelog.

Prerequisites

To build and run the project locally, ensure that the following are installed:

  1. Java Development Kit (JDK) 25.
  2. Docker with Docker Compose.

Use the provided Maven wrapper to build and run the project.

Getting started

Infrastructure

Start Kafka, the schema registry, PostgreSQL, the S3-compatible RustFS object store, and Vault:

docker compose -f docker/docker-compose.yml up

RustFS is available locally at:

  • S3 API: http://localhost:9101
  • Console: http://localhost:9001 using rustfsadmin / rustfsadmin

The bit-jme-processarchive-lockable-obs-local bucket is created automatically with object lock enabled.

Build

./mvnw install

Start

Start the services in separate terminals:

./mvnw -pl jme-process-archive-auth-scs spring-boot:run -Dspring-boot.run.profiles=local
./mvnw -pl jme-process-archive-resource-service spring-boot:run -Dspring-boot.run.profiles=local
./mvnw -pl jme-process-archive-service spring-boot:run -Dspring-boot.run.profiles=local
./mvnw -pl jme-process-archive-inspection-service spring-boot:run -Dspring-boot.run.profiles=local

Equivalent IntelliJ run configurations are included in the repository.

If an incompatible PostgreSQL volume exists from an earlier run, reset the local infrastructure:

docker compose -f docker/docker-compose.yml down -v
docker compose -f docker/docker-compose.yml up

Try the examples

The quickest way to create artifacts is:

curl --header "Content-Type: application/json" --request POST \
  --data '{"title":"test-title","someDecreeData":"test-data"}' \
  http://localhost:8082/jme-process-archive-resource-service/api/decrees

curl --header "Content-Type: application/json" --request PUT \
  --data '{"name":"test-diagram","graph":"test-graph"}' \
  http://localhost:8082/jme-process-archive-resource-service/api/diagrams/example

curl --header "Content-Type: application/json" --request PUT \
  --data '{"payload":"test-payload"}' \
  http://localhost:8082/jme-process-archive-resource-service/api/declarations/example

The Process Archive Service consumes the resulting messages and archives the corresponding artifacts. For the complete walkthrough, including backfill and inspection endpoints, see ARCHIVE-EXAMPLES.md.

Profiles

  • local: Local development using the Docker Compose infrastructure.
  • aws: Deployment using AWS-specific infrastructure.
  • rhos: Deployment on Red Hat OpenShift.

Note

This repository is part of the open source distribution of JME. See github.com/jme-admin-ch/jme for more information.

License

This repository is Open Source Software licensed under the Apache License 2.0.