feat(engine,engine-dmn): Introduce SPI configuration factories#1804
Merged
Conversation
e34fbfb to
e575f58
Compare
|
kthoms
commented
Feb 5, 2026
|
This change adds 2 factory interfaces - ProcessEngineConfigurationFactory - DmnEngineConfigurationFactory The factories are used to decouple the configuration classes - ProcessEngineConfiguration - DmnEngineConfiguration from their implementation classes.
…pl/DmnEngineConfigurationFactoryImpl.java
58c0add to
865618e
Compare
Contributor
There was a problem hiding this comment.
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
ProcessEngineConfigurationFactoryandDmnEngineConfigurationFactorySPI interfaces plus default implementations. - Refactored
ProcessEngineConfigurationandDmnEngineConfigurationstatic creation methods to delegate to SPI-loaded factories viaServiceLoaderUtil. - 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. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This change adds 2 factory interfaces
The factories are used to decouple the configuration classes
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.