# openwms/org.openwms architecture

> Architecture diagram of the GitHub repository openwms/org.openwms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openwms/org.openwms
- Repository: https://github.com/openwms/org.openwms

## Overview

This repository is a shared Java utility library for OpenWMS.org services, not a standalone warehouse workflow. Its main runtime contribution is reusable event infrastructure, including transaction-completion event publication and listener dispatch; it also supplies HTTP response/exception support, Hibernate audit integration, startup signaling, and common domain/value utilities. The README describes the library as shared across services. Source excerpts show several internal calls; other listed modules are represented by their exact implementation paths, but their wiring is not inferred where source was not sampled.

Main entry points: [`org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java`](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java) (Transaction event aspect), [`org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java`](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java) (Synchronous dispatcher), [`org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java`](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java) (HTTP controller base), [`org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransaction.java`](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransaction.java) (Transaction annotations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_events["Events"]
  node_tx_annotations["Transaction annotations"]
  node_async_annotation["Async annotation"]
  node_tx_aspect["Transaction event aspect"]
  node_root_event["Root application event"]
  node_event_broker["Event broker API<br/>[EventBroker.java]"]
  node_event_dispatcher["Event dispatcher API"]
  node_simple_dispatcher["Synchronous dispatcher"]
  node_event_listener["Event listener API<br/>[EventListener.java]"]
  node_merge_event["Properties merge event"]
  node_startup_initializer["Startup initializer"]
end

subgraph group_http["HTTP support"]
  node_http_controller["HTTP controller base"]
  node_http_exception["HTTP business exception"]
  node_exception_codes["Exception codes"]
  node_removal_exception["Removal exception"]
end

subgraph group_persistence["Persistence integration"]
  node_envers["Envers integrator"]
  node_delete_listener["Custom delete listener"]
end

subgraph group_common["Common primitives"]
  node_tree_impl["Tree implementation<br/>[TreeNodeImpl.java]"]
  node_tree_api["Tree node API<br/>[TreeNode.java]"]
  node_collection_util["Collection utilities"]
  node_list_extractor["List extractor<br/>[ListExtractor.java]"]
  node_time_provider["Time provider<br/>[TimeProvider.java]"]
  node_measurable["Measurement interface<br/>[Measurable.java]"]
  node_base_unit["Base unit<br/>[BaseUnit.java]"]
end

node_service_consumers(("OpenWMS services"))

node_service_consumers -.->|"reuse library"| node_tx_annotations
node_service_consumers -.->|"reuse library"| node_event_broker
node_tx_aspect -->|"publishes"| node_root_event
node_tx_aspect -->|"advises"| node_tx_annotations
node_tx_aspect -->|"advises"| node_async_annotation
node_simple_dispatcher -->|"implements"| node_event_dispatcher
node_simple_dispatcher -->|"dispatches"| node_root_event
node_simple_dispatcher -->|"notifies"| node_event_listener
node_startup_initializer -->|"publishes"| node_merge_event
node_http_controller -->|"handles"| node_http_exception
node_http_controller -->|"uses codes"| node_exception_codes
node_http_controller -->|"handles"| node_removal_exception
node_envers -->|"registers"| node_delete_listener
node_tree_impl -->|"implements"| node_tree_api
node_collection_util -->|"uses"| node_list_extractor
node_measurable -->|"uses"| node_base_unit

click node_tx_annotations "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransaction.java"
click node_async_annotation "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransactionAsynchronous.java"
click node_tx_aspect "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java"
click node_root_event "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/RootApplicationEvent.java"
click node_event_broker "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/EventBroker.java"
click node_event_dispatcher "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/EventDispatcher.java"
click node_simple_dispatcher "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java"
click node_event_listener "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/EventListener.java"
click node_merge_event "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/MergePropertiesEvent.java"
click node_startup_initializer "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/startup/LocalServiceInitializer.java"
click node_http_controller "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java"
click node_http_exception "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/http/HttpBusinessException.java"
click node_exception_codes "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/exception/ExceptionCodes.java"
click node_removal_exception "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/listener/RemovalNotAllowedException.java"
click node_envers "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/integration/persistence/EnversIntegrator.java"
click node_delete_listener "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/integration/persistence/CustomPostDeleteEventListener.java"
click node_tree_impl "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/util/TreeNodeImpl.java"
click node_tree_api "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/util/TreeNode.java"
click node_collection_util "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/lang/CollectionUtil.java"
click node_list_extractor "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/lang/ListExtractor.java"
click node_time_provider "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/time/TimeProvider.java"
click node_measurable "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/values/Measurable.java"
click node_base_unit "https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/values/BaseUnit.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tx_annotations,node_async_annotation,node_tx_aspect,node_root_event,node_event_broker,node_event_dispatcher,node_simple_dispatcher,node_event_listener,node_merge_event,node_startup_initializer toneBlue
class node_http_controller,node_http_exception,node_exception_codes,node_removal_exception toneAmber
class node_envers,node_delete_listener toneMint
class node_tree_impl,node_tree_api,node_collection_util,node_list_extractor,node_time_provider,node_measurable,node_base_unit toneRose
class node_service_consumers toneIndigo
```

## Components

### Events

- [Transaction annotations](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransaction.java): `org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransaction.java`
- [Async annotation](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransactionAsynchronous.java): `org.openwms.core.util/src/main/java/org/openwms/core/annotation/FireAfterTransactionAsynchronous.java`
- [Transaction event aspect](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java): `org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java`
- [Root application event](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/RootApplicationEvent.java): `org.openwms.core.util/src/main/java/org/openwms/core/event/RootApplicationEvent.java`
- [Event broker API](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/EventBroker.java): `org.openwms.core.util/src/main/java/org/openwms/core/event/EventBroker.java`
- [Event dispatcher API](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/EventDispatcher.java): `org.openwms.core.util/src/main/java/org/openwms/core/event/EventDispatcher.java`
- [Synchronous dispatcher](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java): `org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java`
- [Event listener API](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/EventListener.java): `org.openwms.core.util/src/main/java/org/openwms/core/event/EventListener.java`
- [Properties merge event](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/event/MergePropertiesEvent.java): `org.openwms.core.util/src/main/java/org/openwms/core/event/MergePropertiesEvent.java`
- [Startup initializer](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/startup/LocalServiceInitializer.java): `org.openwms.core.util/src/main/java/org/openwms/core/startup/LocalServiceInitializer.java`

### HTTP support

- [HTTP controller base](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java): `org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java`
- [HTTP business exception](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/http/HttpBusinessException.java): `org.openwms.core.util/src/main/java/org/openwms/core/http/HttpBusinessException.java`
- [Exception codes](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/exception/ExceptionCodes.java): `org.openwms.core.util/src/main/java/org/openwms/core/exception/ExceptionCodes.java`
- [Removal exception](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/listener/RemovalNotAllowedException.java): `org.openwms.core.util/src/main/java/org/openwms/core/listener/RemovalNotAllowedException.java`

### Persistence integration

- [Envers integrator](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/integration/persistence/EnversIntegrator.java): `org.openwms.core.util/src/main/java/org/openwms/core/integration/persistence/EnversIntegrator.java`
- [Custom delete listener](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/integration/persistence/CustomPostDeleteEventListener.java): `org.openwms.core.util/src/main/java/org/openwms/core/integration/persistence/CustomPostDeleteEventListener.java`

### Common primitives

- [Tree implementation](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/util/TreeNodeImpl.java): `org.openwms.core.util/src/main/java/org/openwms/core/util/TreeNodeImpl.java`
- [Tree node API](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/util/TreeNode.java): `org.openwms.core.util/src/main/java/org/openwms/core/util/TreeNode.java`
- [Collection utilities](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/lang/CollectionUtil.java): `org.openwms.core.util/src/main/java/org/openwms/core/lang/CollectionUtil.java`
- [List extractor](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/lang/ListExtractor.java): `org.openwms.core.util/src/main/java/org/openwms/core/lang/ListExtractor.java`
- [Time provider](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/time/TimeProvider.java): `org.openwms.core.util/src/main/java/org/openwms/core/time/TimeProvider.java`
- [Measurement interface](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/values/Measurable.java): `org.openwms.core.util/src/main/java/org/openwms/core/values/Measurable.java`
- [Base unit](https://github.com/openwms/org.openwms/blob/master/org.openwms.core.util/src/main/java/org/openwms/core/values/BaseUnit.java): `org.openwms.core.util/src/main/java/org/openwms/core/values/BaseUnit.java`

### Other components

- **OpenWMS services**

## Connections

- OpenWMS services → Transaction annotations: reuse library
- OpenWMS services → Event broker API: reuse library
- Transaction event aspect → Root application event: publishes (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java`)
- Transaction event aspect → Transaction annotations: advises (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java`)
- Transaction event aspect → Async annotation: advises (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/aop/FireAfterTransactionAspect.java`)
- Synchronous dispatcher → Event dispatcher API: implements (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java`)
- Synchronous dispatcher → Root application event: dispatches (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java`)
- Synchronous dispatcher → Event listener API: notifies (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/event/SimpleEventDispatcher.java`)
- Startup initializer → Properties merge event: publishes (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/startup/LocalServiceInitializer.java`)
- HTTP controller base → HTTP business exception: handles (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java`)
- HTTP controller base → Exception codes: uses codes (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java`)
- HTTP controller base → Removal exception: handles (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java`)
- Envers integrator → Custom delete listener: registers (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/integration/persistence/EnversIntegrator.java`)
- Tree implementation → Tree node API: implements (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/util/TreeNodeImpl.java`)
- Collection utilities → List extractor: uses (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/lang/CollectionUtil.java`)
- Measurement interface → Base unit: uses (evidence: `org.openwms.core.util/src/main/java/org/openwms/core/values/Measurable.java`)
