Skip to content

feat(engine,engine-dmn): Introduce SPI configuration factories#1804

Merged
kthoms merged 3 commits into
mainfrom
refactor/service-loaders
Apr 7, 2026
Merged

feat(engine,engine-dmn): Introduce SPI configuration factories#1804
kthoms merged 3 commits into
mainfrom
refactor/service-loaders

Conversation

@kthoms

@kthoms kthoms commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

This change adds 2 factory interfaces

  • ProcessEngineConfigurationFactory
  • DmnEngineConfigurationFactory

The factories are used to decouple the configuration classes

  • ProcessEngineConfiguration
  • DmnEngineConfiguration
    from their implementation classes.

Motivation
This is a non-breaking preparational step to decouple the API from its implementation. The abstract classes ProcessEngineConfiguration and DmnEngineConfiguration are direct dependent on their implementation.

@kthoms kthoms requested a review from javahippie December 9, 2025 06:06
@kthoms kthoms marked this pull request as ready for review December 9, 2025 06:41
@kthoms kthoms force-pushed the refactor/service-loaders branch from e34fbfb to e575f58 Compare December 9, 2025 06:46
@sonarqubecloud

sonarqubecloud Bot commented Dec 9, 2025

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

kthoms and others added 3 commits April 7, 2026 06:43
This change adds 2 factory interfaces
- ProcessEngineConfigurationFactory
- DmnEngineConfigurationFactory

The factories are used to decouple the configuration classes
- ProcessEngineConfiguration
- DmnEngineConfiguration
from their implementation classes.
@kthoms kthoms force-pushed the refactor/service-loaders branch from 58c0add to 865618e Compare April 7, 2026 04:46
Copilot AI review requested due to automatic review settings April 7, 2026 04:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces SPI-based configuration factories for the engine and DMN engine to decouple the public configuration APIs from their concrete implementation classes.

Changes:

  • Added ProcessEngineConfigurationFactory and DmnEngineConfigurationFactory SPI interfaces plus default implementations.
  • Refactored ProcessEngineConfiguration and DmnEngineConfiguration static creation methods to delegate to SPI-loaded factories via ServiceLoaderUtil.
  • Added META-INF/services/* registrations and basic tests verifying ServiceLoader discovery.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
engine/src/main/java/org/operaton/bpm/engine/ProcessEngineConfiguration.java Delegates static factory methods to a ServiceLoader-provided configuration factory.
engine/src/main/java/org/operaton/bpm/engine/spi/ProcessEngineConfigurationFactory.java New SPI interface for creating ProcessEngineConfiguration instances.
engine/src/main/java/org/operaton/bpm/engine/impl/cfg/ProcessEngineConfigurationFactoryImpl.java Default SPI implementation that preserves prior construction/parsing behavior.
engine/src/main/resources/META-INF/services/org.operaton.bpm.engine.spi.ProcessEngineConfigurationFactory Registers the default engine factory implementation for ServiceLoader.
engine/src/test/java/org/operaton/bpm/engine/impl/cfg/ProcessEngineConfigurationFactoryImplTest.java Verifies the engine factory implementation is discoverable via ServiceLoader.
engine-dmn/engine/src/main/java/org/operaton/bpm/dmn/engine/DmnEngineConfiguration.java Delegates default DMN config creation to a ServiceLoader-provided factory.
engine-dmn/engine/src/main/java/org/operaton/bpm/dmn/engine/spi/DmnEngineConfigurationFactory.java New SPI interface for creating DmnEngineConfiguration instances.
engine-dmn/engine/src/main/java/org/operaton/bpm/dmn/engine/impl/DmnEngineConfigurationFactoryImpl.java Default SPI implementation returning DefaultDmnEngineConfiguration.
engine-dmn/engine/src/main/resources/META-INF/services/org.operaton.bpm.dmn.engine.spi.DmnEngineConfigurationFactory Registers the default DMN factory implementation for ServiceLoader.
engine-dmn/engine/src/test/java/org/operaton/bpm/dmn/engine/impl/DmnEngineConfigurationFactoryImplTest.java Verifies the DMN factory implementation is discoverable via ServiceLoader.

@sonarqubecloud

sonarqubecloud Bot commented Apr 7, 2026

Copy link
Copy Markdown

@kthoms kthoms added this to the 2.1.0 milestone Apr 7, 2026
@kthoms kthoms added the refactoring Code enhancement without changing API or behaviour label Apr 7, 2026
@kthoms kthoms merged commit 16e90d0 into main Apr 7, 2026
21 checks passed
@kthoms kthoms deleted the refactor/service-loaders branch April 7, 2026 07:50
@kthoms kthoms added the noteworthy Should be documented in the release notes label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

noteworthy Should be documented in the release notes refactoring Code enhancement without changing API or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants