This is an automated email from the ASF dual-hosted git repository.
yesamer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie.git
The following commit(s) were added to refs/heads/main by this push:
new 9fb18de2115 [incubator-kie#7064] Improve kie-api Javadoc generation
and API compatibility reporting (#6704)
9fb18de2115 is described below
commit 9fb18de2115b54d1c91ddd967d328d0990e5ea3b
Author: Yeser Amer <[email protected]>
AuthorDate: Tue Nov 10 18:26:23 2026 +0100
[incubator-kie#7064] Improve kie-api Javadoc generation and API
compatibility reporting (#6704)
* Revapi configured
* revapi
* Minor
* Added java-doc for changed api
* Changelog added
* Changelog updated
* Javadoc fixed
* japicmp experiment
* japicmp removed
* Warning fixed
* Javadoc changes
* Improved deprecation
* Improved deprecation
* Parametrize javadoc
* Added Deprecation
* Added @override
* Minor
* Restore japicmp maven plugin with flexible configuration and
comprehensive documentation
* Revapi config
* revapi config fixed
* removed revapi report
* minor
* Header
* CR
* Added test scope
* Updated
* CR
* KieServices improved
* KieServices improved
* fix
* Package.html
* Merge fix
* javadoc
* CR
* CR
* changelog upgrade
* KieServiceTest
* Minor changes
* [kie-issues#2300] Document semantic versioning and kie-api reference in
CONVENTIONS
* changelog updated
---
CHANGELOG.md | 247 +++++++++++++++++++++
docs/CONVENTIONS.md | 19 ++
kie-api/CHANGELOG.md | 67 ++++++
kie-api/README.md | 151 +++++++++++++
kie-api/pom.xml | 104 ++++-----
kie-api/src/build/revapi-config.json | 68 +++---
kie-api/src/main/java/org/kie/api/KieServices.java | 117 +++++-----
.../main/java/org/kie/api/command/KieCommands.java | 14 ++
.../org/kie/api/conf/BetaRangeIndexOption.java | 1 +
.../org/kie/api/conf/DeclarativeAgendaOption.java | 1 +
.../org/kie/api/conf/EqualityBehaviorOption.java | 1 +
.../org/kie/api/conf/EventProcessingOption.java | 1 +
.../org/kie/api/conf/KieBaseMutabilityOption.java | 1 +
.../main/java/org/kie/api/conf/MBeansOption.java | 1 +
kie-api/src/main/java/org/kie/api/conf/Option.java | 4 +-
.../org/kie/api/conf/OptionsConfiguration.java | 18 +-
.../java/org/kie/api/conf/PrototypesOption.java | 1 +
.../org/kie/api/conf/RemoveIdentitiesOption.java | 1 +
.../java/org/kie/api/conf/SequentialOption.java | 1 +
.../java/org/kie/api/conf/SessionsPoolOption.java | 1 +
.../api/event/process/ProcessEventListener.java | 4 +
.../event/process/ProcessNodeStateChangeEvent.java | 7 +-
.../event/process/ProcessNodeTriggeredEvent.java | 5 +
.../api/event/process/ProcessRetriggeredEvent.java | 2 +
.../api/event/process/ProcessStateChangeEvent.java | 4 +-
.../kie/api/internal/utils/KieServiceLoader.java | 6 +-
.../src/main/java/org/kie/api/io/ResourceType.java | 6 +-
.../KieBaseConfigurationMonitorMBean.java | 60 ++++-
kie-api/src/main/java/org/kie/api/package.html | 74 +++++-
.../kie/api/persistence/jpa/KieStoreServices.java | 11 +-
.../main/java/org/kie/api/runtime/KieContext.java | 6 +-
.../main/java/org/kie/api/runtime/KieRuntime.java | 6 +
.../org/kie/api/runtime/KieRuntimeBuilder.java | 14 ++
.../main/java/org/kie/api/runtime/KieSession.java | 4 +-
.../java/org/kie/api/runtime/RuntimeSession.java | 6 +
.../org/kie/api/runtime/StatelessKieSession.java | 9 +-
.../conf/AccumulateNullPropagationOption.java | 1 +
.../api/runtime/conf/BeliefSystemTypeOption.java | 1 +
.../org/kie/api/runtime/conf/ClockTypeOption.java | 1 +
.../kie/api/runtime/conf/DirectFiringOption.java | 1 +
.../kie/api/runtime/conf/KeepReferenceOption.java | 1 +
.../api/runtime/conf/PersistedSessionOption.java | 1 +
.../kie/api/runtime/conf/QueryListenerOption.java | 1 +
.../org/kie/api/runtime/conf/ThreadSafeOption.java | 1 +
.../api/runtime/conf/TimedRuleExecutionOption.java | 1 +
.../api/runtime/conf/TimerJobFactoryOption.java | 1 +
.../api/runtime/conf/WorkItemHandlerOption.java | 1 +
.../api/runtime/process/NodeInstanceContainer.java | 4 +
.../java/org/kie/api/runtime/rule/EntryPoint.java | 5 +-
kie-api/src/main/javadoc/overview.html | 24 +-
.../org/kie/api/internal/utils/KieServiceTest.java | 236 ++++++++++++++++++++
kie-parent/pom.xml | 68 ++++--
.../kie-pmml-models-drools-tree-evaluator/pom.xml | 1 +
53 files changed, 1185 insertions(+), 207 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000000..6619b55f287
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,247 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+# Changelog
+
+All notable changes to the Apache KIE Drools project will be documented in
this file.
+
+## [10.3.0] - 2026-11-xx
+
+### Added
+- YAML property retrieval support (PR #6662)
+- `sequence()` DSL and Phreak `SequenceNode` (PR #6909)
+- RuleUnit DSL: rule attributes (PR #6912), STREAM event processing with CEP
temporal operators (PR #7104) and follow-up CEP operators (PR #7122)
+- Declared enums can reference other declared types (PR #6738)
+- Workflow Engine: dynamic process calling (PR #6824)
+- Workflow Engine: dynamic signals based on variables (PR #7204)
+- Support for undeclared process variables (PR #7199)
+- Support for `java.lang.Object` as a process variable type (PR #7151)
+- Support for untyped collection process variables in persistence proto
generation (PR #7196)
+- Allow WS-Human Task lifecycle transition parameters (PR #7139)
+- Configurable pool size for the REST work item handler `WebClient` (PR #7167)
+- `outOfOrder` property in `KieFlyway` (PR #7193)
+- Data isolation by process id and version pair in data-audit addons (PR #6852)
+
+### Changed
+- Migrated `quarkus-resteasy` to `quarkus-rest` (PR #7258)
+- Default expression format changed from MVEL to Java (PR #6885)
+- Unified user task models and REST endpoints by task name in BPMN processes
(PR #7207)
+- Interrupting event sub process aligned with BPMN 2.0 specification, section
13.4.4 (PR #7257)
+- Sequential mode: disabled beta node sharing (PR #7202), ignored
`@Propagation(IMMEDIATE)` (PR #7220) and removed the fallback to sequential
mode in `ForEachNodeInstance` with async nodes (PR #7208)
+- Delay `ProcessInstance` lock release to transaction commit to avoid stale
reads in multi-threaded scenarios (PR #7163)
+- Upgraded Quarkus to 3.33.4 (PR #7153)
+- Upgraded Spring Boot to 4.1.1 (PR #7128)
+- Upgraded Spring Framework to 7.0.9 (PR #7086)
+- Upgraded Netty to 4.1.138.Final (PR #7153)
+- Upgraded Vert.x to 4.5.34 (PR #7153)
+- Upgraded Jetty to 12.0.36 (PR #6828)
+- Upgraded Tomcat embed core to 11.0.26 (PR #7169)
+- Upgraded Jackson to 2.22.3 (PR #7157) and Jackson 3.x to 3.1.7 (PR #7195)
+- Upgraded logback-core to 1.6.3 (PR #7090)
+- Upgraded Micrometer to 1.17.1, OW2 ASM to 9.11.1 and snappy-java to
1.1.10.12 (PR #7228)
+- Upgraded MVEL to 2.5.4.Final (PR #7077)
+- Upgraded Guava to 33.7.2-jre (PR #7249)
+- Upgraded Maven to 3.9.16 (PR #6899)
+- Upgraded Wiremock to 3.13.2 (PR #6741)
+- Upgraded kafka-clients to 4.1.2 (PR #6671)
+- Upgraded Bouncy Castle to 1.86 and Apache Ant to 1.10.18 (PR #7195)
+- Upgraded OpenNLP to 2.5.12, WildFly Elytron to 2.8.5 and zstd-jni to
1.5.7-16 (PR #7169)
+- Upgraded lz4-java to 1.11.4 (PR #7183)
+- Upgraded log4j-api to 2.26.1 (PR #6869)
+- Upgraded Keycloak to 26.1.5 (PR #7098)
+- Upgraded MongoDB driver to 5.11.1 (PR #7153)
+- Upgraded FreeMarker to 2.3.35 (PR #7131)
+- Upgraded SCRAM to 3.3 (PR #6797)
+- Upgraded parsson to 1.1.8 (PR #6799)
+
+### Removed
+- YaRD and Serverless Workflow support (PR #6663)
+
+### Security
+- Fixed CVE-2024-6763, CVE-2025-11143, CVE-2026-2332, CVE-2025-5115: Upgraded
Jetty (PR #6748)
+- Fixed CVE-2026-45292: Upgraded opentelemetry-api to 1.62.0 (PR #7112)
+- Fixed CVE-2026-33870, CVE-2026-33871, CVE-2026-42583: Upgraded Netty (PR
#6673, PR #6764)
+- Fixed CVE-2025-67030: Upgraded plexus-utils to 3.6.1 (PR #6670)
+- Fixed CVE-2025-67721: Upgraded Jackson core (PR #6672)
+- Fixed CVE-2026-1002: Upgraded vertx-core (PR #6636)
+- Fixed CVE-2022-41853: Upgraded HSQLDB to 2.7.1 (PR #6563)
+- Fixed CVE-2026-56624: Upgraded Apache MINA SSHD to 2.19.0 (PR #6873)
+- Fixed CVE-2026-107314, CVE-2026-107315: Upgraded PostgreSQL JDBC driver to
42.7.14 (PR #7218)
+- Fixed CVE-2026-18710: Pinned MongoDB driver (PR #7093)
+- Fixed CVE-2026-59295, CVE-2026-59296: Upgraded Micrometer (PR #7088)
+- Fixed CVE-2026-47857, CVE-2026-47863: Upgraded reactor-core to 3.8.7 (PR
#7103)
+- Fixed log forging (CWE-117) (PR #6861) and sanitized control characters in
`DataAuditQuery.toString()` (PR #7268)
+- Validate protobuf session deserialization (PR #6823)
+- Apply the Drools deserialization class allowlist to Java-serialized process
variables (PR #7254)
+
+### Fixed
+- Provide correct Jackson 2 integration for all Spring Boot based KIE modules
(PR #6735)
+- Guard subnetwork-not right-delete against null memory (PR #6756)
+- Fix broken behavior involving ForIterationNode (PR #6746)
+- Fix getDecisionService method NPE (PR #6740)
+- Fix NPE in RuleExecutor.removeDormantTuple (PR #6707)
+- Preserve insertion order in ListDataStore (PR #6734)
+- PseudoClockScheduler may retain 1000 canceled jobs at most (PR #6660)
+- not-subnetwork silently stops firing after cross-package segment split (PR
#7135)
+- ClassCastException in doSubnetwork2 when a subnetwork is shared by not() and
accumulate() (PR #7191)
+- exists(A() and not B()) stops firing when a sibling package wraps the same
CE in its own exists (PR #7116)
+- Accumulate rule stops firing after its segment is split (PR #7110)
+- Evaluate alpha constraints during isAllowedCachedLeft in CombinedConstraint
(PR #7124)
+- Collect facts, not subnetwork tuples, in GenericCollectAccumulator (PR #7224)
+- Accumulate for non-reversible functions (PR #6796)
+- Inline-accumulate result binding used in a result constraint (PR #6791)
+- NPE evaluating after() under an OR-of-negated-join (PR #6760)
+- Park no-loop/lock-on-active blocked tuples in dormantMatches (PR #6768)
+- Auto-focus in PhreakRuleTerminalNode does not halt the active group
evaluator (PR #6908)
+- Do not create duplicate facts on insert in sequential mode (PR #7250)
+- Keep facts dynamic across a marshalling round trip (PR #7127) and release
dynamic facts when they are deleted or expired (PR #7176)
+- Ternary condition in an inline-eval (PR #7096)
+- `contains` on a generic `Map.get()` String no longer broken after jitting
(PR #7145)
+- Declared types: extends across packages (PR #6785), kbase-wide globals
referenced from another package (PR #6786), Java annotations preserved when the
DRL declare block is empty (PR #7186)
+- Executable model: `@propertyChangeSupport` (PR #7146), Java superclass
`@Position` fields (PR #6780), DRL `@role` overriding Java `@Role` (PR #7251),
capitalized DRL type annotations (PR #7270)
+- DRL10 ANTLR4 parser: lambdas and methods in functions (PR #6896)
+- Register concrete project classloaders as parallel capable (PR #6809)
+- Improve CronExpression wildcard validation (PR #6774)
+- Warning for "correspondence between package and folder names" triggered
unexpectedly (PR #7129)
+- DMN: nested list results from Context expressions in for loops (PR #7230)
+- DMN: `typeRef` on `tUnaryTests` broken for DMN 1.3-1.6 since 10.2.0 (PR
#7184)
+- DMN: compilation failure on DecisionService-Decision output type mismatch
(PR #6776)
+- DMN: performance regression of FEEL evaluation (PR #6871)
+- DMN: B-FEEL relational comparison returning false for non-boolean operands
(PR #6770)
+- DMN: date time conversion issue (PR #6789)
+- Process variable with an empty structureRef fails to build (PR #7225)
+- Intermediate message correlation failure inside a subprocess (PR #7130)
+- Message-correlated signals sent through `ProcessEventDispatcher` do not
publish DataEvents (PR #7190)
+- NPE in embedded job service (PR #7148) and intermittent NPE on terminate (PR
#7197)
+- `KieMemoryCompilerException: code too large` for large BPMNs (PR #6888)
+- Message start event without data mapping fails code generation (PR #6821)
+- Duplicate process variable in Swagger page when the name starts with a
capital letter (PR #6845)
+- Invalid Java identifier generation for REST task params with hyphens (PR
#7158)
+- Concurrent duplicate ProcessDefinition insert (PR #6850)
+- Scope the `UnitOfWorkManager` bean to the application, not the JVM (PR #7107)
+- Avoid redundant process instance unmarshalling when signaling via
`ProcessService` (PR #7092)
+- Use the correct configuration property by removing `@WithParentName` (PR
#7152)
+- WIH exception handling (PR #7166)
+
+## [10.2.0] - 2026-03-28
+
+### Added
+- Question mark operator support in decision table unary test expressions (PR
#6577)
+- Configurable compile-time warning for self-referencing constraints (PR #6618)
+- Validation for fact types used in rules (PR #6524)
+- Test Scenario Runner adapted to JUnit 5 Test Engine (PR #6338)
+- DMN error handling modes (PR #6387)
+- Support for re-scheduling Process Instances and Node Instances SLA timers
(PR #6358)
+- PathUtils implementation (PR #6355)
+- New date and time conversion functions (PR #6303)
+
+### Changed
+- **kie-api**: API changes - see
[kie-api/CHANGELOG.md](kie-api/CHANGELOG.md#1020---2026-03-28)
+- Upgraded Quarkus to 3.27.2 (PR #6575)
+- Upgraded Maven to 3.9.11 (PR #6409)
+- Upgraded Spring Boot to 3.4.11 (PR #6502)
+- Upgraded testcontainers to 2.0.3 (PR #6552)
+- Migrated Apache licenses check to apache-rat 0.17.x (PR #6550)
+
+### Security
+- Fixed path traversal vulnerability (PR #6615)
+- Fixed multiple CVEs via dependency upgrades (PR #6544)
+- Upgraded tomcat-dbcp to 10.1.48 (PR #6505)
+- Upgraded vertx-web to 4.5.22 (PR #6500)
+- Upgraded logback to 1.5.19 (PR #6485)
+
+### Fixed
+- DMN TCK unary test 005 returning null (PR #6556)
+- DMN missing evaluationHitIds in decision tables (PR #6553)
+- DMN missing evaluationHitIds in conditional expressions (PR #6568)
+- Null pointer with exists() clauses (PR #6585)
+- DMN/EFESTO LocalUriId generation in Gradle context (PR #6607)
+- Comparing lists using `in` does not work (PR #6557)
+- Activation-group not applied after rule fires (PR #6517)
+- Rules in agenda group with auto-focus issues (PR #6449, #6447)
+- Multiple rules in activation group firing (PR #6419)
+- Conditional named consequence with break (PR #6461)
+- Parser exception with leading zeros in DRL10 (PR #6541)
+- Executable-model missing passive flag (PR #6530)
+- kJar code generation not failing on unknown field in OOPath (PR #6518)
+
+## [10.1.0] - 2025-04-30
+
+### Added
+- DMN 1.6 support
+- New Antlr4 DRL parser (disabled by default) (PR #6225)
+- DMN B-FEEL implementation (PR #6213)
+- Support for generic range types in DMN engine (PR #6123)
+- DMNEvent reporting in DMNConditionalEvaluator (PR #6124)
+- Rule IDs in AfterEvaluateDecisionTableEvent (PR #6127)
+- Multi-module and indexed dependencies support (PR #6278)
+- Support for BigInteger arithmetic operations with executable-model (PR #6276)
+- Support for traits to inherit multiple traits (PR #5824)
+- Support for trait type declaration (PR #5820)
+
+### Changed
+- **kie-api**: API changes - see
[kie-api/CHANGELOG.md](kie-api/CHANGELOG.md#1010---2025-04-30)
+- Upgraded Quarkus to 3.15 (PR #6131)
+- Upgraded MVEL to 2.5.2.Final (PR #6226)
+- Upgraded logback to 1.5.16 (PR #6236)
+- Upgraded XStream to 1.4.21 (PR #6148)
+- Upgraded protobuf-java (PR #6094)
+- Removed drools-docs from repository (Apache policy compliance, PR #6287)
+- Cleaned up legacy change-set support (PR #6188)
+- Cleaned up legacy .rf format support (PR #6189)
+
+### Security
+- Fixed CVE-2023-0833: Upgraded okhttp to address vulnerability (PR #6230)
+- Fixed netty-related CVE (PR #6263)
+- Upgraded logback-core from 1.4.14 to 1.5.13 (PR #6208)
+
+### Fixed
+- DMN TCK range equality test failures for unary test ranges (PR #6134)
+- DMN type check for decision service input parameters (PR #6133)
+- DMN namespace alignment verification (PR #6259)
+- DMN zero-seconds truncation on date time (PR #6255)
+- DMN evaluation hit IDs mapping in nested conditional/decision table elements
(PR #6271)
+- DMN evaluation hit ID mapping to belonging decision (PR #6242)
+- DMN range comparison failures in FEEL with unary test ranges (PR #6231)
+- DMN range-related TCK failures (PR #6244)
+- DMN range starting with null not permitted (PR #6266)
+- DMN missing conditional element runtime exception (PR #6257)
+- DMN lambda function returning null TCK failure (PR #6261)
+- DMN return list of dates instead of range (PR #6223)
+- Test Scenario version attribute not correctly retrieved (PR #6254)
+- BooleanEvalHelper class cast exceptions (PR #6229)
+- Group node validation failure (PR #6262)
+- Property reactivity not reacting to super class properties overridden by sub
class getter (PR #6251)
+- Removal of detached tuples during incremental compilation (PR #6192)
+- ForkJoinPool context ClassLoader inheritance (PR #6211)
+- SessionConfiguration loading at startup in project templates (PR #6218)
+- DroolsAssetsProcessor exception when no DRL resources present (PR #6277)
+- Accumulate min evaluation (PR #6186)
+- KieServiceLoader thread-safety (PR #6177)
+
+## [10.0.0] - 2024-12-10
+
+### Added
+- Initial release
+- **kie-api**: Initial API - see
[kie-api/CHANGELOG.md](kie-api/CHANGELOG.md#1000---2024-12-10)
+
+[10.3.0]: https://github.com/apache/incubator-kie-drools/compare/10.2.0...HEAD
+[10.2.0]:
https://github.com/apache/incubator-kie-drools/compare/10.1.0...10.2.0
+[10.1.0]:
https://github.com/apache/incubator-kie-drools/compare/10.0.0...10.1.0
+[10.0.0]: https://github.com/apache/incubator-kie-drools/releases/tag/10.0.0
\ No newline at end of file
diff --git a/docs/CONVENTIONS.md b/docs/CONVENTIONS.md
index aad92bc51ad..19c4b8c79bb 100644
--- a/docs/CONVENTIONS.md
+++ b/docs/CONVENTIONS.md
@@ -35,6 +35,25 @@
meaningful variable names, small classes with a single clear responsibility,
and methods that don't depend on hidden state established by their callers.
+## Versioning and public API changes
+
+- Semantic Versioning applies to the entire codebase: every module, feature,
+ and any public resource an end user can use (APIs, configuration, file
+ formats, generated artifacts, …), whatever module it lives in.
+- Breaking changes are only allowed in a major release, and what is going to
+ be removed must be **deprecated first** (in an earlier release), so users
+ have time to migrate.
+- Exceptions are possible but not the norm: if there is a good reason to
+ break something outside of a major release (or without deprecating it
+ first), it can be proposed and eventually merged. The PR must call it out
+ explicitly so the reviewing committers are aware of it, and depending on its
+ impact it may require a discussion in the Apache KIE community mailing list.
+- Today, only the `kie-api` module is tracked for API changes. Its rules (API
+ change management, deprecation and removal) are described in
+ [kie-api/README.md](../kie-api/README.md); read them before adding,
+ changing, deprecating, or removing anything in it, and follow the same
+ principles elsewhere.
+
## Licensing
- Every source file carries the ASF license header. This is enforced in CI
diff --git a/kie-api/CHANGELOG.md b/kie-api/CHANGELOG.md
new file mode 100644
index 00000000000..55d75d9599a
--- /dev/null
+++ b/kie-api/CHANGELOG.md
@@ -0,0 +1,67 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+# Changelog
+
+All notable changes to the kie-api module will be documented in this file.
+
+## [10.3.0] - 2026-11-xx
+
+No API changes.
+
+## [10.2.0] - 2026-03-28
+
+### Added
+- `ProcessStateChangeEvent` - Event interface for process state changes (PR
#6358)
+- `ProcessNodeStateChangeEvent` - Event interface for process node state
changes (PR #6358)
+- `ProcessEventListener.onProcessStateChanged(ProcessStateChangeEvent)` -
Default method for process state change notifications (PR #6358)
+- `ProcessEventListener.onNodeStateChanged(ProcessNodeStateChangeEvent)` -
Default method for node state change notifications (PR #6358)
+- `KieCommands.newApplyPmmlModel(Map<String, Object>)` - New PMML model
command using Map instead of PMMLRequestData (PR #6310)
+
+### Removed
+- `KieCommands.newApplyPmmlModel(PMMLRequestData)` - Migrate to
`newApplyPmmlModel(Map<String, Object>)` by converting your PMMLRequestData to
a Map (PR #6310)
+
+## [10.1.0] - 2025-04-30
+
+### Added
+- `ProcessRetriggeredEvent` - Event interface for process retriggered events
(PR #6275)
+- `ProcessNodeTriggeredEvent.isRetrigger()` - Default method to detect
retriggered nodes (PR #6275)
+- `RuntimeSession` - New interface extracting common runtime session
operations (PR #6103)
+- `KieRuntimeBuilder.newStatelessKieSession()` - Create stateless session from
builder (PR #6103)
+- `KieRuntimeBuilder.newStatelessKieSession(String)` - Create named stateless
session from builder (PR #6103)
+- `KieCommands.newBatchExecution(Command...)` - Default method for batch
execution (PR #6103)
+- `NodeInstanceContainer.getSerializableNodeInstances()` - Default method for
serialization support (PR #6116)
+
+### Changed
+- `KieRuntime` now extends `RuntimeSession` - Refactored to use new
RuntimeSession interface (PR #6103)
+- `StatelessKieSession` now extends `RuntimeSession` - Refactored to use new
RuntimeSession interface (PR #6103)
+
+### Removed
+- `org.kie.api.event.usertask.*` classes - Moved to
`org.kie.kogito.usertask.events` as part of kogito-api (PR #6052). Update your
imports to use the new package location
+- `ResourceType.DRF` field - Removed as part of .rf (ruleflow) format cleanup
(PR #6189). The .rf format is no longer supported. Use BPMN2 format instead
+
+## [10.0.0] - 2024-12-10
+
+### Added
+- Initial release
+
+[10.3.0]: https://github.com/apache/incubator-kie-drools/compare/10.2.0...HEAD
+[10.2.0]:
https://github.com/apache/incubator-kie-drools/compare/10.1.0...10.2.0
+[10.1.0]:
https://github.com/apache/incubator-kie-drools/compare/10.0.0...10.1.0
+[10.0.0]: https://github.com/apache/incubator-kie-drools/releases/tag/10.0.0
\ No newline at end of file
diff --git a/kie-api/README.md b/kie-api/README.md
new file mode 100644
index 00000000000..13fe668234a
--- /dev/null
+++ b/kie-api/README.md
@@ -0,0 +1,151 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+# KIE API
+
+The Apache KIE Public API module provides the core interfaces and classes for
the Drools, DMN and jBPM rule engines. This API aims to maintain backwards
compatibility within minor and patch releases, following semantic versioning
principles.
+
+## API Change Management
+
+Apache KIE follows [Semantic Versioning](https://semver.org/) since release
10.3.0:
+- **Major version** (X.0.0): Breaking changes allowed
+- **Minor version** (0.X.0): New features, backwards compatible
+- **Patch version** (0.0.X): Bug fixes only, backwards compatible
+
+### API Deprecation and Removal
+
+- APIs planned for removal must be **deprecated first** and can only be
removed in a **major release**
+- Deprecation must include:
+ - `@Deprecated` annotation with `since` and `forRemoval` attributes
+ - Javadoc explaining why it's deprecated and the recommended alternative
+ - Exception: When an entire feature is removed, no alternative may exist
+
+### API Changes
+
+- **Changing an API**: Deprecate the existing API and introduce the new one.
Redirect users via javadoc
+- **New APIs**: Must include `@since` javadoc tag indicating the version when
introduced
+- **Documentation**: All public APIs must have comprehensive javadoc
+
+## API Compatibility Checking
+
+This module uses [Revapi](https://revapi.org/) as the primary tool for API
compatibility checking and enforcement.
+
+Additionally, [JApiCmp](https://github.com/siom79/japicmp) is used to generate
supplementary compatibility reports for analysis purposes.
+
+### Revapi
+
+#### Purpose
+Revapi automatically detects breaking changes in the public API by comparing
the current code against a previous release, helping maintain backwards
compatibility.
+
+#### Usage
+
+The `revapi.latestVersion` property defines which version to compare against.
The current version is defined in `build-parent/pom.xml`.
+
+```bash
+# Check API compatibility (uses revapi.latestVersion from global settings)
+mvn clean verify
+
+# Or specify version explicitly (check build-parent/pom.xml for current
version)
+mvn clean verify -Drevapi.latestVersion=<version>
+
+# Generate detailed HTML report
+mvn clean package -Drevapi.latestVersion=<version>
+# Report: target/site/revapi-report.html
+```
+
+#### Handling API Changes
+
+If Revapi detects API changes and you need to make **intentional** breaking or
non-breaking changes:
+
+1. Review the reported changes carefully
+2. Update `src/build/revapi-config.json` to approve the changes
+3. Add each change to the `ignore` array with:
+ - Description of the change
+ - Justification explaining why it's necessary
+
+**Example:**
+```json
+[
+ {
+ "extension": "revapi.differences",
+ "configuration": {
+ "ignore": true,
+ "differences": [
+ {
+ "code": "java.method.addedToInterface",
+ "new": "method void org.kie.api.KieSession::newMethod()",
+ "justification": "kie-issues#xyz: Added new method for feature X"
+ }
+ ]
+ }
+ }
+]
+```
+
+#### Configuration
+- **Config file**: `src/build/revapi-config.json`
+- **Excludes**: Internal packages (`org.kie.internal.*`,
`org.kie.api.internal.*`)
+- **Tracks**: Deprecations and API changes
+
+#### Resources
+- [Official Website](https://revapi.org/)
+- [GitHub Repository](https://github.com/revapi/revapi)
+- [Documentation](https://revapi.org/revapi-site/main/index.html)
+
+### JApiCmp (Report Generation Only)
+
+#### Purpose
+JApiCmp generates detailed binary compatibility reports for analysis and
documentation purposes. In this project, JApiCmp is configured to not break the
build on compatibility issues (the default behavior), making it suitable for
report generation and analysis only. This is unlike Revapi, which is configured
to enforce compatibility and can fail the build.
+
+#### Usage
+
+JApiCmp runs automatically during the `package` phase. The comparison is
configured via properties in `build-parent/pom.xml`:
+
+```bash
+# Run with default settings (compares against kie.latest.released.version)
+mvn clean package
+
+# Override comparison version
+mvn clean package -Djapicmp.oldVersion.version=10.1.0
+
+# For downstream products with different coordinates
+mvn clean package \
+ -Djapicmp.oldVersion.version=1.0.0
+```
+
+#### Report Output
+
+JApiCmp generates reports in the `target` directory:
+- Console output during build showing detected changes
+- Detailed reports can be generated in HTML, XML, or other formats (see [Maven
Plugin Goals](https://siom79.github.io/japicmp/MavenPlugin.html#goals))
+
+#### Configuration
+
+**Plugin Configuration** (in `kie-api/pom.xml`):
+- **Goal**: `cmp` - Compares the current artifact against the old version
+- **Phase**: `package` - Runs during the package phase
+- **Excludes**: Internal packages (`org.kie.internal`, `org.kie.api.internal`)
+
+**Properties** (defined in `build-parent/pom.xml`):
+- `japicmp.oldVersion.version` - Version to compare against (default:
`${kie.latest.released.version}`)
+
+#### Resources
+- [Official Website](https://siom79.github.io/japicmp/)
+- [GitHub Repository](https://github.com/siom79/japicmp)
+- [Maven Plugin
Documentation](https://siom79.github.io/japicmp/MavenPlugin.html)
\ No newline at end of file
diff --git a/kie-api/pom.xml b/kie-api/pom.xml
index ff061f817bf..4f18f304de5 100644
--- a/kie-api/pom.xml
+++ b/kie-api/pom.xml
@@ -38,39 +38,6 @@
<java.module.name>org.kie.api</java.module.name>
</properties>
- <profiles>
- <profile>
- <id>apiviz-config</id>
- <activation>
- <jdk>(,10]</jdk>
- </activation>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <!-- Important: this doclet requires Graphviz (the 'dot'
command) to be installed.
- It logs warning if it can not find the command, but the
build continues and the generated javadoc simply
- does not contain the graphs. This is not ideal, but it's
better that just failing directly as the 'dot'
- command is not installed by default on most systems and
this would put additional burden for contributors
- to build the project. We need to make sure that our build
machines do have the Graphviz installed. -->
- <doclet>org.jboss.apiviz.APIviz</doclet>
- <docletArtifact>
- <groupId>com.grahamedgecombe.apiviz</groupId>
- <artifactId>apiviz</artifactId>
- <version>1.3.4</version>
- </docletArtifact>
- <source>${maven.compiler.release}</source>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
-
<build>
<plugins>
<plugin>
@@ -79,7 +46,7 @@
<configuration>
<sourcepath>${project.basedir}/src/main/java</sourcepath>
<excludePackageNames>org.kie.util*</excludePackageNames>
- <source>${maven.compiler.release}</source>
+ <release>${maven.compiler.release}</release>
<groups>
<group>
<title>KIE Base API</title>
@@ -113,13 +80,7 @@
<title>Time API</title>
<packages>org.kie.api.time*</packages>
</group>
- <group>
- <title>Task API</title>
- <packages>org.kie.api.task*</packages>
- </group>
</groups>
- <useStandardDocletOptions>true</useStandardDocletOptions>
- <!--additionalparam>-sourceclasspath
${project.build.outputDirectory}</additionalparam-->
</configuration>
<executions>
<execution>
@@ -132,6 +93,57 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.revapi</groupId>
+ <artifactId>revapi-maven-plugin</artifactId>
+ <configuration>
+ <analysisConfigurationFiles>
+ <file>${project.basedir}/src/build/revapi-config.json</file>
+ </analysisConfigurationFiles>
+ <oldArtifacts>
+ <artifact>org.kie:kie-api:${revapi.latestVersion}</artifact>
+ </oldArtifacts>
+ <reportCriticality>documented</reportCriticality>
+ </configuration>
+ <executions>
+ <execution>
+ <id>check-api-compatibility</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.github.siom79.japicmp</groupId>
+ <artifactId>japicmp-maven-plugin</artifactId>
+ <version>${version.japicmp.maven.plugin}</version>
+ <configuration>
+ <oldVersion>
+ <dependency>
+ <groupId>${japicmp.oldVersion.groupId}</groupId>
+ <artifactId>${japicmp.oldVersion.artifactId}</artifactId>
+ <version>${japicmp.oldVersion.version}</version>
+ </dependency>
+ </oldVersion>
+ <parameter>
+ <excludes>
+ <exclude>org.kie.internal</exclude>
+ <exclude>org.kie.api.internal</exclude>
+ </excludes>
+ </parameter>
+ </configuration>
+ <executions>
+ <execution>
+ <id>japicmp-report</id>
+ <phase>package</phase>
+ <goals>
+ <goal>cmp</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
@@ -141,16 +153,6 @@
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>jakarta.activation</groupId>
- <artifactId>jakarta.activation-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -159,7 +161,7 @@
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
diff --git a/kie-api/src/build/revapi-config.json
b/kie-api/src/build/revapi-config.json
index d8ff939356e..528a7b4a5f8 100644
--- a/kie-api/src/build/revapi-config.json
+++ b/kie-api/src/build/revapi-config.json
@@ -1,40 +1,32 @@
-{
- "filters": {
- "revapi": {
- "java": {
- "filter": {
- "classes": {
- "regex": true,
- "exclude": []
- }
- }
- }
- }
- },
- "ignores": {
- "revapi": {
- "_comment": "Changes between 7.52.0.Final and the current branch.
These changes are desired and thus ignored.",
- "ignore": [
- {
- "code": "java.method.addedToInterface",
- "new": "method boolean
org.kie.api.builder.model.KieSessionModel::isAccumulateNullPropagation()",
- "package": "org.kie.api.builder.model",
- "classSimpleName": "KieSessionModel",
- "methodName": "isAccumulateNullPropagation",
- "elementKind": "method",
- "justification": "configuration switch for allowing null
propagation in accumulate"
- },
- {
- "code": "java.method.addedToInterface",
- "new": "method org.kie.api.builder.model.KieSessionModel
org.kie.api.builder.model.KieSessionModel::setAccumulateNullPropagation(boolean)",
- "package": "org.kie.api.builder.model",
- "classSimpleName": "KieSessionModel",
- "methodName": "setAccumulateNullPropagation",
- "elementKind": "method",
- "justification": "configuration switch for allowing null
propagation in accumulate"
- }
- ]
+[
+ {
+ "extension": "revapi.differences",
+ "configuration": {
+ "ignore": true,
+ "differences": [
+ {
+ "code": "java.annotation.attributeAdded",
+ "annotationType": "java.lang.Deprecated",
+ "justification": "Adding version information (since/forRemoval
attributes) to existing @Deprecated annotations is a documentation improvement
that does not affect binary or source compatibility"
}
+ ]
+ }
+ },
+ {
+ "extension": "revapi.filter",
+ "configuration": {
+ "elements": {
+ "exclude": [
+ {
+ "matcher": "java-package",
+ "match": "org.kie.internal.**"
+ },
+ {
+ "matcher": "java-package",
+ "match": "org.kie.api.internal.**"
+ }
+ ]
+ }
}
-}
-
+ }
+]
\ No newline at end of file
diff --git a/kie-api/src/main/java/org/kie/api/KieServices.java
b/kie-api/src/main/java/org/kie/api/KieServices.java
index 7517aec9c72..deca4292747 100644
--- a/kie-api/src/main/java/org/kie/api/KieServices.java
+++ b/kie-api/src/main/java/org/kie/api/KieServices.java
@@ -40,8 +40,7 @@ import org.kie.api.runtime.KieSessionConfiguration;
/**
* <p>
* The KieServices is a thread-safe singleton acting as a hub giving access to
the other
- * Services provided by Kie. As general rule a getX() method just returns a
reference to another
- * singleton while a newX() one creates a new instance.
+ * Services provided by Kie.
* </p>
* <p>
* It is possible to obtain a KieServices reference via its Factory as it
follows
@@ -49,6 +48,22 @@ import org.kie.api.runtime.KieSessionConfiguration;
* <pre>
* KieServices kieServices = KieServices.Factory.get();
* </pre>
+ * <p>
+ * <b>Method Naming Convention:</b> Methods prefixed with {@code get()} return
singleton or cached instances,
+ * while methods prefixed with {@code new()} create fresh instances each time
they are called.
+ * </p>
+ * <p>
+ * <b>Container ID Enforcement:</b> Several methods accept a {@code
containerId} parameter to enforce a specific
+ * container identifier. When successful, the KieContainer and its containerId
are registered within KieServices.
+ * Deregistration can be performed by calling {@link KieContainer#dispose()}
on the resulting KieContainer.
+ * If you do not want to enforce a specific containerId, use the method
variants without the containerId parameter.
+ * </p>
+ *
+ * @see KieContainer
+ * @see KieBase
+ * @see KieBaseConfiguration
+ * @see KieRepository
+ * @since 6.0.0
*/
public interface KieServices extends KieService {
@@ -97,7 +112,7 @@ public interface KieServices extends KieService {
/**
* Returns KieContainer for the classpath using the given classLoader,
* this a global singleton.
- * @param classLoader classLoader
+ * @param classLoader The ClassLoader to use for loading classes
* @return kie classpath container
*
* @throws IllegalStateException if this method get called twice with 2
different ClassLoaders
@@ -107,26 +122,21 @@ public interface KieServices extends KieService {
/**
* Returns KieContainer for the classpath enforcing the given containerId,
* this a global singleton.
- * <p>If enforcing the containerId is successful, the KieContainer and its
containerId are registered within the KieServices.
- * Deregistration can be performed by calling {@link
KieContainer#dispose()} on the resulting KieContainer.</p>
- * <p> If you do not want to enforce a specific containerId, use the
{@link #getKieClasspathContainer()} method instead. </p>
- * @param containerId the containerId to enforce (non-null).
+ * @param containerId the containerId to enforce (non-null)
* @return kie classpath container
*
- * @throws IllegalStateException if the containerId is already existing
for another container and therefore cannot be enforced.
+ * @throws IllegalStateException if the containerId is already existing
for another container and therefore cannot be enforced
*/
KieContainer getKieClasspathContainer(String containerId);
/**
* Returns KieContainer for the classpath enforcing the given containerId
and using the given classLoader,
* this a global singleton.
- * <p>If enforcing the containerId is successful, the KieContainer and its
containerId are registered within the KieServices.
- * Deregistration can be performed by calling {@link
KieContainer#dispose()} on the resulting KieContainer.</p>
- * @param containerId the containerId to enforce (non-null).
- * @param classLoader classLoader
+ * @param containerId the containerId to enforce (non-null)
+ * @param classLoader The ClassLoader to use for loading classes
* @return kie classpath container
*
- * @throws IllegalStateException if this method get called twice with 2
different ClassLoaders, or if the containerId is already existing for another
container and therefore cannot be enforced.
+ * @throws IllegalStateException if this method get called twice with 2
different ClassLoaders, or if the containerId is already existing for another
container and therefore cannot be enforced
*/
KieContainer getKieClasspathContainer(String containerId, ClassLoader
classLoader);
@@ -139,7 +149,7 @@ public interface KieServices extends KieService {
/**
* Creates a new KieContainer for the classpath using the given
classLoader,
* regardless if there's already an existing one
- * @param classLoader classLoader
+ * @param classLoader The ClassLoader to use for loading classes
* @return new kie classpath container
*/
KieContainer newKieClasspathContainer(ClassLoader classLoader);
@@ -148,12 +158,9 @@ public interface KieServices extends KieService {
* Creates a new KieContainer for the classpath,
* regardless if there's already an existing one,
* enforcing the given containerId.
- * <p>If enforcing the containerId is successful, the KieContainer and its
containerId are registered within the KieServices.
- * Deregistration can be performed by calling {@link
KieContainer#dispose()} on the resulting KieContainer.</p>
- * <p> If you do not want to enforce a specific containerId, use the
{@link #newKieClasspathContainer()} method instead. </p>
- * @param containerId a unique containerId (non-null).
+ * @param containerId a unique containerId (non-null)
* @return new kie classpath container
- * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced.
+ * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced
*/
KieContainer newKieClasspathContainer(String containerId);
@@ -161,12 +168,10 @@ public interface KieServices extends KieService {
* Creates a new KieContainer for the classpath using the given
classLoader,
* regardless if there's already an existing one,
* enforcing the given containerId.
- * <p>If enforcing the containerId is successful, the KieContainer and its
containerId are registered within the KieServices.
- * Deregistration can be performed by calling {@link
KieContainer#dispose()} on the resulting KieContainer.</p>
- * @param containerId a unique containerId (non-null).
- * @param classLoader classLoader
+ * @param containerId a unique containerId (non-null)
+ * @param classLoader The ClassLoader to use for loading classes
* @return new kie classpath container
- * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced.
+ * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced
*/
KieContainer newKieClasspathContainer(String containerId, ClassLoader
classLoader);
@@ -174,14 +179,18 @@ public interface KieServices extends KieService {
* Creates a new KieContainer for the classpath using the given
classLoader,
* regardless if there's already an existing one,
* enforcing the given containerId.
- * <p>If enforcing the containerId is successful, the KieContainer and its
containerId are registered within the KieServices.
- * Deregistration can be performed by calling {@link
KieContainer#dispose()} on the resulting KieContainer.</p>
- * @param containerId a unique containerId (non-null).
- * @param classLoaderContainer classLoader
+ * <p>
+ * This is an optional operation that may not be supported by all
KieServices implementations.
+ * The default implementation throws UnsupportedOperationException.
Implementations that support
+ * creating classpath containers with explicit release IDs should override
this method.
+ * </p>
+ * @param containerId a unique containerId (non-null)
+ * @param classLoaderContainer The ClassLoader to use for loading classes
* @param releaseId release id of this container
* @return new kie classpath container
- * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced.
- * @throws UnsupportedOperationException if the operation is not supported
by the kie services
+ * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced
+ * @throws UnsupportedOperationException if the operation is not supported
by the kie services implementation
+ * @since 7.0.0
*/
default KieContainer newKieClasspathContainer(String containerId,
ClassLoader classLoaderContainer, ReleaseId releaseId) {
throw new UnsupportedOperationException("new container with release id
is not supported");
@@ -197,13 +206,10 @@ public interface KieServices extends KieService {
/**
* Creates a new KieContainer wrapping the KieModule with the given
ReleaseId
* and enforcing the given containerId.
- * <p>If enforcing the containerId is successful, the KieContainer and its
containerId are registered within the KieServices.
- * Deregistration can be performed by calling {@link
KieContainer#dispose()} on the resulting KieContainer.</p>
- * <p> If you do not want to enforce a specific containerId, use the
{@link #newKieContainer(ReleaseId)} method instead. </p>
- * @param containerId a unique containerId (non-null).
+ * @param containerId a unique containerId (non-null)
* @param releaseId releaseId
* @return new kie container
- * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced.
+ * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced
*/
KieContainer newKieContainer(String containerId, ReleaseId releaseId);
@@ -211,7 +217,7 @@ public interface KieServices extends KieService {
* Creates a new KieContainer wrapping the KieModule with the given
ReleaseId
* and using the given class loader
* @param releaseId releaseId
- * @param classLoader classLoader
+ * @param classLoader The ClassLoader to use for loading classes
* @return new kie container
*/
KieContainer newKieContainer(ReleaseId releaseId, ClassLoader classLoader);
@@ -220,13 +226,11 @@ public interface KieServices extends KieService {
* Creates a new KieContainer wrapping the KieModule with the given
ReleaseId,
* using the given class loader
* and enforcing the given containerId.
- * <p>If enforcing the containerId is successful, the KieContainer and its
containerId are registered within the KieServices.
- * Deregistration can be performed by calling {@link
KieContainer#dispose()} on the resulting KieContainer.</p>
- * @param containerId a unique containerId (non-null).
+ * @param containerId a unique containerId (non-null)
* @param releaseId releaseId
- * @param classLoader classLoader
+ * @param classLoader The ClassLoader to use for loading classes
* @return new kie container
- * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced.
+ * @throws IllegalStateException if the containerId is already existing
for another container, and therefore cannot be enforced
*/
KieContainer newKieContainer(String containerId, ReleaseId releaseId,
ClassLoader classLoader);
@@ -263,6 +267,8 @@ public interface KieServices extends KieService {
/**
* Creates a new KieBuilder to build the KieModule contained in the given
KieFileSystem
* and using the given class loader
+ * @param kieFileSystem The KieFileSystem containing the module resources
+ * @param classLoader The ClassLoader to use for loading classes
* @return new kie builder
*/
KieBuilder newKieBuilder(KieFileSystem kieFileSystem, ClassLoader
classLoader);
@@ -280,7 +286,7 @@ public interface KieServices extends KieService {
* Creates a new KieFileSystem used to programmatically define the
resources composing a KieModule
* @return new kie file system
*/
- KieFileSystem newKieFileSystem( );
+ KieFileSystem newKieFileSystem();
/**
* Creates a new KieModuleModel to programmatically define a KieModule
@@ -306,12 +312,14 @@ public interface KieServices extends KieService {
* Create a KieBaseConfiguration on which properties can be set. Use
* the given properties file and ClassLoader - either of which can be null.
* @param properties properties
- * @param classLoader classLoader
+ * @param classLoader The ClassLoader to use (ignored - will be removed in
future version)
* @return new kiebase configuration
*
- * @deprecated The classLoader has to be defined when creating the
KieContainer,
- * so the one passed here will be just ignored
+ * @deprecated since 6.3.0, the classLoader must be defined when creating
the KieContainer,
+ * so the one passed here will be ignored. Use {@link
#newKieBaseConfiguration(Properties)}
+ * instead and set the ClassLoader on the KieContainer.
*/
+ @Deprecated(since = "6.3.0", forRemoval = true)
KieBaseConfiguration newKieBaseConfiguration(Properties properties,
ClassLoader classLoader);
/**
@@ -331,7 +339,7 @@ public interface KieServices extends KieService {
* Create a KieSessionConfiguration on which properties can be set. Use
* the given properties file and ClassLoader - either of which can be null.
* @param properties properties
- * @param classLoader classLoader
+ * @param classLoader The ClassLoader to use for loading classes
* @return new kiesession configuration
*/
KieSessionConfiguration newKieSessionConfiguration(Properties properties,
ClassLoader classLoader);
@@ -339,8 +347,7 @@ public interface KieServices extends KieService {
/**
* Instantiate and return an Environment
*
- * @return
- * The Environment
+ * @return A new Environment instance for configuring runtime context
*/
Environment newEnvironment();
@@ -352,16 +359,26 @@ public interface KieServices extends KieService {
}
/**
- * A Factory for this KieServices
+ * A Factory for this KieServices.
+ * <p>
+ * This factory uses the initialization-on-demand holder idiom to provide
+ * thread-safe lazy initialization of the KieServices singleton without
+ * requiring synchronization.
+ * </p>
*/
class Factory {
+ /**
+ * Lazy holder for thread-safe singleton initialization.
+ * The INSTANCE is not initialized until the LazyHolder class is
referenced.
+ */
private static class LazyHolder {
- private static KieServices INSTANCE =
KieService.load(KieServices.class);
+ private static final KieServices INSTANCE =
KieService.load(KieServices.class);
}
/**
* Returns a reference to the KieServices singleton
+ * @return The KieServices singleton instance
*/
public static KieServices get() {
return LazyHolder.INSTANCE;
diff --git a/kie-api/src/main/java/org/kie/api/command/KieCommands.java
b/kie-api/src/main/java/org/kie/api/command/KieCommands.java
index 19da26cbfe7..4573248386a 100644
--- a/kie-api/src/main/java/org/kie/api/command/KieCommands.java
+++ b/kie-api/src/main/java/org/kie/api/command/KieCommands.java
@@ -116,6 +116,13 @@ public interface KieCommands extends KieService {
String name,
Object[] arguments);
+ /**
+ * Creates a batch execution command from varargs.
+ * @param commands the commands to execute
+ * @return the batch execution command
+ * @since 10.1.0
+ * @apiNote Convenience method for varargs instead of List
+ */
default BatchExecutionCommand newBatchExecution(Command... commands) {
return newBatchExecution( asList(commands) );
}
@@ -151,6 +158,13 @@ public interface KieCommands extends KieService {
Command<Long> newAdvanceSessionTime(long amount, TimeUnit unit);
Command<Long> newAdvanceSessionTime(long amount, TimeUnit unit, String
outIdentifier);
+ /**
+ * Creates a command to apply a PMML model.
+ * @param request the PMML request data as a Map
+ * @return the command
+ * @since 10.2.0
+ * @apiNote Replaces deprecated newApplyPmmlModel(PMMLRequestData).
Convert PMMLRequestData to Map before calling.
+ */
Command newApplyPmmlModel(Map<String, Object> request);
ExecutionResults newExecutionResults();
diff --git a/kie-api/src/main/java/org/kie/api/conf/BetaRangeIndexOption.java
b/kie-api/src/main/java/org/kie/api/conf/BetaRangeIndexOption.java
index 4e686da84aa..7f8eb5a7f51 100644
--- a/kie-api/src/main/java/org/kie/api/conf/BetaRangeIndexOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/BetaRangeIndexOption.java
@@ -51,6 +51,7 @@ public enum BetaRangeIndexOption implements
SingleValueRuleBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/conf/DeclarativeAgendaOption.java
b/kie-api/src/main/java/org/kie/api/conf/DeclarativeAgendaOption.java
index 241460bd3f6..46f4b3c3a02 100644
--- a/kie-api/src/main/java/org/kie/api/conf/DeclarativeAgendaOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/DeclarativeAgendaOption.java
@@ -51,6 +51,7 @@ public enum DeclarativeAgendaOption implements
SingleValueRuleBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/EqualityBehaviorOption.java
b/kie-api/src/main/java/org/kie/api/conf/EqualityBehaviorOption.java
index 602f2871ba9..a7a8b2af3b3 100644
--- a/kie-api/src/main/java/org/kie/api/conf/EqualityBehaviorOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/EqualityBehaviorOption.java
@@ -41,6 +41,7 @@ public enum EqualityBehaviorOption implements
SingleValueRuleBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/EventProcessingOption.java
b/kie-api/src/main/java/org/kie/api/conf/EventProcessingOption.java
index 797b0143cf5..70a7787eba3 100644
--- a/kie-api/src/main/java/org/kie/api/conf/EventProcessingOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/EventProcessingOption.java
@@ -59,6 +59,7 @@ public enum EventProcessingOption
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/conf/KieBaseMutabilityOption.java
b/kie-api/src/main/java/org/kie/api/conf/KieBaseMutabilityOption.java
index 00154e1d014..7399666c2cf 100644
--- a/kie-api/src/main/java/org/kie/api/conf/KieBaseMutabilityOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/KieBaseMutabilityOption.java
@@ -43,6 +43,7 @@ public enum KieBaseMutabilityOption implements
SingleValueKieBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/MBeansOption.java
b/kie-api/src/main/java/org/kie/api/conf/MBeansOption.java
index a0115072ce7..339c22beccc 100644
--- a/kie-api/src/main/java/org/kie/api/conf/MBeansOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/MBeansOption.java
@@ -46,6 +46,7 @@ public enum MBeansOption implements SingleValueKieBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/Option.java
b/kie-api/src/main/java/org/kie/api/conf/Option.java
index a34d85597ed..20b91fe35c3 100644
--- a/kie-api/src/main/java/org/kie/api/conf/Option.java
+++ b/kie-api/src/main/java/org/kie/api/conf/Option.java
@@ -27,8 +27,10 @@ public interface Option extends Serializable {
/**
* @return the property name for this option
+ * @deprecated since 8.35.0, use {@link #propertyName()} instead.
Immutable properties should not
+ * need getter/setter naming convention. Will be removed in a
future version.
*/
- @Deprecated // immutable properties should not need getter/setter, this is
common now for "value" types.
+ @Deprecated(since = "8.35.0", forRemoval = true)
String getPropertyName();
default String propertyName() {
diff --git a/kie-api/src/main/java/org/kie/api/conf/OptionsConfiguration.java
b/kie-api/src/main/java/org/kie/api/conf/OptionsConfiguration.java
index 520c69f2f75..1a177f0a515 100644
--- a/kie-api/src/main/java/org/kie/api/conf/OptionsConfiguration.java
+++ b/kie-api/src/main/java/org/kie/api/conf/OptionsConfiguration.java
@@ -28,13 +28,10 @@ public interface OptionsConfiguration<T extends Option, S
extends SingleValueOpt
void makeImmutable();
/**
- * Gets an option value
+ * Sets an option value
*
* @param option the option class for the option being requested
- * @param <C extends T>
- *
- * @return the Option value for the given option. Returns null if option is
- * not configured.
+ * @param <C> the option type
*/
<C extends T> void setOption( C option );
@@ -67,11 +64,14 @@ public interface OptionsConfiguration<T extends Option, S
extends SingleValueOpt
/**
* Deprecated, KEY now exists top level, and its preferred to be explicit
that this is a sub key
- * @param optionKey
- * @return
- * @param <C>
+ *
+ * @param optionKey the option key
+ * @return the set of sub keys
+ * @param <C> the option type
+ * @deprecated since 8.35.0, use {@link #getOptionSubKeys(OptionKey)}
instead. The method name
+ * should explicitly indicate it returns sub keys. Will be
removed in a future version.
*/
- @Deprecated
+ @Deprecated(since = "8.35.0", forRemoval = true)
default <C extends M> Set<String> getOptionKeys(OptionKey<C> optionKey) {
return getOptionSubKeys(optionKey);
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/PrototypesOption.java
b/kie-api/src/main/java/org/kie/api/conf/PrototypesOption.java
index ac348b4adcb..e7028aef853 100644
--- a/kie-api/src/main/java/org/kie/api/conf/PrototypesOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/PrototypesOption.java
@@ -41,6 +41,7 @@ public enum PrototypesOption implements
SingleValueRuleBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/RemoveIdentitiesOption.java
b/kie-api/src/main/java/org/kie/api/conf/RemoveIdentitiesOption.java
index e2dbfc09c8b..a2e40a1240e 100644
--- a/kie-api/src/main/java/org/kie/api/conf/RemoveIdentitiesOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/RemoveIdentitiesOption.java
@@ -47,6 +47,7 @@ public enum RemoveIdentitiesOption implements
SingleValueRuleBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/SequentialOption.java
b/kie-api/src/main/java/org/kie/api/conf/SequentialOption.java
index b761c6731a3..0d28585476e 100644
--- a/kie-api/src/main/java/org/kie/api/conf/SequentialOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/SequentialOption.java
@@ -46,6 +46,7 @@ public enum SequentialOption implements
SingleValueRuleBaseOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git a/kie-api/src/main/java/org/kie/api/conf/SessionsPoolOption.java
b/kie-api/src/main/java/org/kie/api/conf/SessionsPoolOption.java
index 08b3d138ca8..c2fba52ea2a 100644
--- a/kie-api/src/main/java/org/kie/api/conf/SessionsPoolOption.java
+++ b/kie-api/src/main/java/org/kie/api/conf/SessionsPoolOption.java
@@ -43,6 +43,7 @@ public class SessionsPoolOption implements
SingleValueRuleBaseOption {
return new SessionsPoolOption( size );
}
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java
b/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java
index d09f08d7d55..792f6d90089 100644
--- a/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java
+++ b/kie-api/src/main/java/org/kie/api/event/process/ProcessEventListener.java
@@ -146,6 +146,8 @@ public interface ProcessEventListener
* Invoked right after a process instance is modified.
*
* @param event the non-null {@link ProcessStateChangeEvent}
+ * @since 10.2.0
+ * @apiNote Use for SLA timer re-scheduling notifications
*/
default void onProcessStateChanged(ProcessStateChangeEvent event) {}
@@ -153,6 +155,8 @@ public interface ProcessEventListener
* Invoked right after a node in a process instance is modified.
*
* @param event the non-null {@link ProcessNodeStateChangeEvent}
+ * @since 10.2.0
+ * @apiNote Use for SLA timer re-scheduling notifications
*/
default void onNodeStateChanged(ProcessNodeStateChangeEvent event) {}
}
diff --git
a/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeStateChangeEvent.java
b/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeStateChangeEvent.java
index 2ce46ca32f3..1f741a56d93 100644
---
a/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeStateChangeEvent.java
+++
b/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeStateChangeEvent.java
@@ -19,5 +19,10 @@
package org.kie.api.event.process;
-public interface ProcessNodeStateChangeEvent extends ProcessNodeEvent{
+/**
+ * Event fired when a node in a process instance changes state.
+ * @since 10.2.0
+ * @apiNote Used for SLA timer re-scheduling notifications
+ */
+public interface ProcessNodeStateChangeEvent extends ProcessNodeEvent {
}
diff --git
a/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeTriggeredEvent.java
b/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeTriggeredEvent.java
index 02f9cf6611d..e2ae43ae577 100644
---
a/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeTriggeredEvent.java
+++
b/kie-api/src/main/java/org/kie/api/event/process/ProcessNodeTriggeredEvent.java
@@ -22,6 +22,11 @@ package org.kie.api.event.process;
* An event when a node inside a process instance has been triggered.
*/
public interface ProcessNodeTriggeredEvent extends ProcessNodeEvent {
+ /**
+ * Indicates if this node was retriggered after an error.
+ * @return true if retriggered, false otherwise
+ * @since 10.1.0
+ */
default boolean isRetrigger() {
return false;
}
diff --git
a/kie-api/src/main/java/org/kie/api/event/process/ProcessRetriggeredEvent.java
b/kie-api/src/main/java/org/kie/api/event/process/ProcessRetriggeredEvent.java
index 4ff31a8c4a2..ff0aa98f879 100644
---
a/kie-api/src/main/java/org/kie/api/event/process/ProcessRetriggeredEvent.java
+++
b/kie-api/src/main/java/org/kie/api/event/process/ProcessRetriggeredEvent.java
@@ -20,6 +20,8 @@ package org.kie.api.event.process;
/**
* A runtime event that is generated when a ProcessInstance is re-triggered
after an error.
+ * @since 10.1.0
+ * @apiNote Fired when a process is restarted after error recovery
*/
public interface ProcessRetriggeredEvent
extends
diff --git
a/kie-api/src/main/java/org/kie/api/event/process/ProcessStateChangeEvent.java
b/kie-api/src/main/java/org/kie/api/event/process/ProcessStateChangeEvent.java
index 1808ab7e403..ce50c0187fb 100644
---
a/kie-api/src/main/java/org/kie/api/event/process/ProcessStateChangeEvent.java
+++
b/kie-api/src/main/java/org/kie/api/event/process/ProcessStateChangeEvent.java
@@ -19,7 +19,9 @@
package org.kie.api.event.process;
/**
- * An event when a process instance has been started.
+ * Event fired when a process instance changes state.
+ * @since 10.2.0
+ * @apiNote Used for SLA timer re-scheduling notifications
*/
public interface ProcessStateChangeEvent
extends
diff --git
a/kie-api/src/main/java/org/kie/api/internal/utils/KieServiceLoader.java
b/kie-api/src/main/java/org/kie/api/internal/utils/KieServiceLoader.java
index 76b5087d0db..530a0afd026 100644
--- a/kie-api/src/main/java/org/kie/api/internal/utils/KieServiceLoader.java
+++ b/kie-api/src/main/java/org/kie/api/internal/utils/KieServiceLoader.java
@@ -28,7 +28,7 @@ public class KieServiceLoader {
static final KieServiceLoader INSTANCE = new KieServiceLoader();
- private static final KieService DUMMY_SERIVCE = new KieService() {};
+ private static final KieService DUMMY_SERVICE = new KieService() {};
private final Map<String, KieService> serviceCache = new
ConcurrentHashMap<>();
@@ -43,11 +43,11 @@ public class KieServiceLoader {
T cachedService = (T) serviceCache.get(serviceKey);
if (cachedService != null) {
- return cachedService == DUMMY_SERIVCE ? null : cachedService;
+ return cachedService == DUMMY_SERVICE ? null : cachedService;
}
T loadedService = load(serviceClass, tag);
- serviceCache.put(serviceKey, loadedService == null ? DUMMY_SERIVCE :
loadedService);
+ serviceCache.put(serviceKey, loadedService == null ? DUMMY_SERVICE :
loadedService);
return loadedService;
}
diff --git a/kie-api/src/main/java/org/kie/api/io/ResourceType.java
b/kie-api/src/main/java/org/kie/api/io/ResourceType.java
index ab565a29c85..e540e51731e 100644
--- a/kie-api/src/main/java/org/kie/api/io/ResourceType.java
+++ b/kie-api/src/main/java/org/kie/api/io/ResourceType.java
@@ -208,9 +208,11 @@ public class ResourceType implements Serializable {
"src/main/resources",
"drl.template");
/**
- * @deprecated Since 8. Consider <code>drools-decisiontables</code> or
third party templating features
+ * @deprecated since 8.28.0, consider using
<code>drools-decisiontables</code> or third party
+ * templating features instead. DRT format is no longer
actively maintained.
+ * Will be removed in a future version.
*/
- @Deprecated
+ @Deprecated(since = "8.28.0", forRemoval = true)
public static final ResourceType DRT = addResourceTypeToRegistry("DRT",
"Drools
Rule Template",
"src/main/resources",
diff --git
a/kie-api/src/main/java/org/kie/api/management/KieBaseConfigurationMonitorMBean.java
b/kie-api/src/main/java/org/kie/api/management/KieBaseConfigurationMonitorMBean.java
index e07cd377502..a4bed262aad 100644
---
a/kie-api/src/main/java/org/kie/api/management/KieBaseConfigurationMonitorMBean.java
+++
b/kie-api/src/main/java/org/kie/api/management/KieBaseConfigurationMonitorMBean.java
@@ -20,42 +20,82 @@ package org.kie.api.management;
public interface KieBaseConfigurationMonitorMBean {
- @Deprecated
+ /**
+ * @return the alpha node hashing threshold
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public int getAlphaNodeHashingThreshold();
public String getAssertBehaviour();
- @Deprecated
+ /**
+ * @return the composite key depth
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public int getCompositeKeyDepth();
public String getEventProcessingMode();
- @Deprecated
+ /**
+ * @return the maximum number of threads
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public int getMaxThreads();
- @Deprecated
+ /**
+ * @return the sequential agenda setting
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public String getSequentialAgenda();
- @Deprecated
+ /**
+ * @return whether left beta memory is indexed
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public boolean isIndexLeftBetaMemory();
- @Deprecated
+ /**
+ * @return whether right beta memory is indexed
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public boolean isIndexRightBetaMemory();
- @Deprecated
+ /**
+ * @return whether TMS is maintained
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public boolean isMaintainTms();
public boolean isMBeansEnabled();
public boolean isRemoveIdentities();
- @Deprecated
+ /**
+ * @return whether sequential mode is enabled
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public boolean isSequential();
- @Deprecated
+ /**
+ * @return whether alpha nodes are shared
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public boolean isShareAlphaNodes();
- @Deprecated
+ /**
+ * @return whether beta nodes are shared
+ * @deprecated since 8.35.0, this configuration option is no longer used.
Will be removed in a future version.
+ */
+ @Deprecated(since = "8.35.0", forRemoval = true)
public boolean isShareBetaNodes();
}
diff --git a/kie-api/src/main/java/org/kie/api/package.html
b/kie-api/src/main/java/org/kie/api/package.html
index 3ce3cca0c96..5dbab86e04c 100644
--- a/kie-api/src/main/java/org/kie/api/package.html
+++ b/kie-api/src/main/java/org/kie/api/package.html
@@ -18,5 +18,77 @@
-->
<body>
- Base KIE API classes.
+<h1>KIE API - Core Package</h1>
+
+<p>
+This package contains the core interfaces of the Apache KIE (Knowledge Is
Everything) API,
+providing the foundation for building and executing business rules, processes,
and decision services.
+</p>
+
+<h2>Key Components</h2>
+
+<h3>KieServices</h3>
+<p>
+The central entry point and factory for all KIE services. This thread-safe
singleton provides access to:
+</p>
+<ul>
+ <li>KieContainer - for loading and managing KIE modules</li>
+ <li>KieRepository - for managing KIE module artifacts</li>
+ <li>KieBuilder - for building KIE modules from resources</li>
+ <li>Configuration factories - for creating KieBase and KieSession
configurations</li>
+</ul>
+
+<h3>KieBase</h3>
+<p>
+A repository of knowledge definitions (rules, processes, functions, type
models).
+The KieBase is immutable and serves as a factory for creating KieSession
instances where runtime data is managed.
+</p>
+
+<h3>KieBaseConfiguration</h3>
+<p>
+Configuration interface for customizing KieBase behavior at instantiation
time.
+Supports property-based configuration for equality behavior, sequential mode,
TMS, and more.
+</p>
+
+<h3>PropertiesConfiguration</h3>
+<p>
+Base interface for configuration classes, providing simple property get/set
operations.
+</p>
+
+<h2>Getting Started</h2>
+
+<p>Basic usage example:</p>
+<pre>
+// Get the KieServices singleton
+KieServices kieServices = KieServices.get();
+
+// Create a KieContainer from the classpath
+KieContainer kieContainer = kieServices.getKieClasspathContainer();
+
+// Get a KieBase
+KieBase kieBase = kieContainer.getKieBase();
+
+// Create a KieSession
+KieSession kieSession = kieBase.newKieSession();
+
+// Insert facts and fire rules
+kieSession.insert(myFact);
+kieSession.fireAllRules();
+
+// Clean up
+kieSession.dispose();
+</pre>
+
+<h2>Related Packages</h2>
+<ul>
+ <li><code>org.kie.api.builder</code> - Building and managing KIE modules</li>
+ <li><code>org.kie.api.runtime</code> - Runtime execution (KieSession,
StatelessKieSession)</li>
+ <li><code>org.kie.api.conf</code> - Configuration options</li>
+ <li><code>org.kie.api.event</code> - Event listeners for monitoring</li>
+</ul>
+
+<p>
+For more information, see the <a href="https://kie.apache.org/">Drools
documentation</a>.
+</p>
+
</body>
diff --git
a/kie-api/src/main/java/org/kie/api/persistence/jpa/KieStoreServices.java
b/kie-api/src/main/java/org/kie/api/persistence/jpa/KieStoreServices.java
index aa9d49a63e2..34362e3cc0f 100644
--- a/kie-api/src/main/java/org/kie/api/persistence/jpa/KieStoreServices.java
+++ b/kie-api/src/main/java/org/kie/api/persistence/jpa/KieStoreServices.java
@@ -32,8 +32,17 @@ public interface KieStoreServices extends KieService {
/**
* Deprecated use {@link #loadKieSession(Long, KieBase,
KieSessionConfiguration, Environment)} instead
+ *
+ * @param id the session id
+ * @param kbase the KieBase
+ * @param configuration the session configuration
+ * @param environment the environment
+ * @return the loaded KieSession
+ * @deprecated since 6.3.0, use {@link #loadKieSession(Long, KieBase,
KieSessionConfiguration, Environment)} instead.
+ * This overload uses an {@code int} session id; use the
{@code Long}-based overload for a wider id range.
+ * Will be removed in a future version.
*/
- @Deprecated
+ @Deprecated(since = "6.3.0", forRemoval = true)
KieSession loadKieSession(int id,
KieBase kbase,
KieSessionConfiguration configuration,
diff --git a/kie-api/src/main/java/org/kie/api/runtime/KieContext.java
b/kie-api/src/main/java/org/kie/api/runtime/KieContext.java
index 85684a324b0..dc8a83d81aa 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/KieContext.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/KieContext.java
@@ -30,7 +30,11 @@ public interface KieContext {
/**
* Added for backwards compatibility.
* Will be removed in the future.
+ *
+ * @return the KieRuntime instance
+ * @deprecated since 6.0.0, use {@link #getKieRuntime()} instead. This
method uses the old
+ * "Knowledge" naming convention from before the Kie rebrand.
Will be removed in a future version.
*/
- @Deprecated
+ @Deprecated(since = "6.0.0", forRemoval = true)
KieRuntime getKnowledgeRuntime();
}
diff --git a/kie-api/src/main/java/org/kie/api/runtime/KieRuntime.java
b/kie-api/src/main/java/org/kie/api/runtime/KieRuntime.java
index 880b7fb01cc..49c9017fcbd 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/KieRuntime.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/KieRuntime.java
@@ -23,6 +23,12 @@ import org.kie.api.runtime.process.ProcessRuntime;
import org.kie.api.runtime.rule.RuleRuntime;
import org.kie.api.time.SessionClock;
+/**
+ * KieRuntime provides runtime capabilities for rule and process execution.
+ * Extends RuntimeSession for common session operations.
+ * @apiNote This is the primary interface for stateful rule sessions. For
stateless
+ * execution, use StatelessKieSession instead.
+ */
public interface KieRuntime extends RuntimeSession, RuleRuntime,
ProcessRuntime, KieRuntimeEventManager {
/**
diff --git a/kie-api/src/main/java/org/kie/api/runtime/KieRuntimeBuilder.java
b/kie-api/src/main/java/org/kie/api/runtime/KieRuntimeBuilder.java
index ed2a1e1840f..21fc101eaaf 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/KieRuntimeBuilder.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/KieRuntimeBuilder.java
@@ -27,7 +27,21 @@ public interface KieRuntimeBuilder {
KieSession newKieSession();
KieSession newKieSession(String sessionName);
+ /**
+ * Creates a new stateless session.
+ * @return a new stateless session
+ * @since 10.1.0
+ * @apiNote Convenience method added to builder pattern
+ */
StatelessKieSession newStatelessKieSession();
+
+ /**
+ * Creates a new named stateless session.
+ * @param sessionName the session name
+ * @return a new stateless session
+ * @since 10.1.0
+ * @apiNote Convenience method added to builder pattern
+ */
StatelessKieSession newStatelessKieSession(String sessionName);
default KieSession newKieSession(KieSessionConfiguration conf) {
diff --git a/kie-api/src/main/java/org/kie/api/runtime/KieSession.java
b/kie-api/src/main/java/org/kie/api/runtime/KieSession.java
index 2ab9c14302c..b6618c30d0e 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/KieSession.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/KieSession.java
@@ -101,8 +101,10 @@ public interface KieSession
* Deprecated. use {@link #getIdentifier()} instead
*
* @return id of this session
+ * @deprecated since 6.3.0, use {@link #getIdentifier()} instead. This
method returns int which
+ * can overflow for long-running sessions. Will be removed in
a future version.
*/
- @Deprecated
+ @Deprecated(since = "6.3.0", forRemoval = true)
int getId();
long getIdentifier();
diff --git a/kie-api/src/main/java/org/kie/api/runtime/RuntimeSession.java
b/kie-api/src/main/java/org/kie/api/runtime/RuntimeSession.java
index 75be12322c0..b4ce2b78fc1 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/RuntimeSession.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/RuntimeSession.java
@@ -22,6 +22,12 @@ import org.kie.api.KieBase;
import java.util.Map;
+/**
+ * Common interface for runtime session operations shared by stateful and
stateless sessions.
+ * @since 10.1.0
+ * @apiNote Use this interface when writing code that works with both
KieRuntime
+ * and StatelessKieSession to avoid coupling to specific session
types.
+ */
public interface RuntimeSession extends CommandExecutor {
/**
diff --git a/kie-api/src/main/java/org/kie/api/runtime/StatelessKieSession.java
b/kie-api/src/main/java/org/kie/api/runtime/StatelessKieSession.java
index ef1e7d92bf9..d4570570731 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/StatelessKieSession.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/StatelessKieSession.java
@@ -29,9 +29,12 @@ import org.kie.api.runtime.rule.StatelessRuleSession;
* shot method that will internally instantiate a KieSession, add all the user
data and execute user commands, call fireAllRules, and then
* call dispose(). While the main way to work with this class is via the
BatchExecution Command as supported by the CommandExecutor interface,
* two convenience methods are provided for when simple object insertion is
all that's required.
+ * Extends RuntimeSession for common session operations.
+ * @apiNote Use this for fire-and-forget rule execution where you don't need
to maintain a session state
+ * between invocations. For stateful sessions with iterative rule
execution, use KieSession instead.
*
* <p>
- * Simple example showing a stateless session executing for a given collection
of java objects using the convenience api. It will iterate the collection
inserting
+ * A simple example showing a stateless session executing for a given
collection of java objects using the convenience api. It will iterate the
collection inserting
* each element in turn
* </p>
* <pre>
@@ -50,7 +53,7 @@ import org.kie.api.runtime.rule.StatelessRuleSession;
* </pre>
*
* <p>
- * Note if you wanted to insert the collection itself, and not the iterate and
insert the elements, then kieCommands.newInsert( collection ) would do the job.
+ * Note if you wanted to insert the collection itself and not the iterating
and insert the elements, then kieCommands.newInsert( collection ) would do the
job.
* </p>
*
* <p>
@@ -62,7 +65,7 @@ import org.kie.api.runtime.rule.StatelessRuleSession;
* StatelessKieSession support globals, scoped in a number of ways. I'll cover
the non-command way first,
* as commands are scoped to a specific execution call. Globals can be
resolved in three ways. The StatelessKieSession
* supports getGlobals(), which returns a Globals instance. These globals are
shared for ALL execution calls, so be especially careful of mutable
- * globals in these cases - as often execution calls can be executing
simultaneously in different threads. Globals also supports a delegate, which
+ * globals in these cases - as often execution calls can be executed
simultaneously in different threads. Globals also supports a delegate, which
* adds a second way of resolving globals. Calling of setGlobal(String,
Object) will actually be set on an internal Collection, identifiers in this
internal
* Collection will have priority over supplied delegate, if one is added. If
an identifier cannot be found in
* the internal Collection, it will then check the delegate Globals, if one
has been set.
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/AccumulateNullPropagationOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/AccumulateNullPropagationOption.java
index 39badda17de..5c0b5c8cc14 100644
---
a/kie-api/src/main/java/org/kie/api/runtime/conf/AccumulateNullPropagationOption.java
+++
b/kie-api/src/main/java/org/kie/api/runtime/conf/AccumulateNullPropagationOption.java
@@ -55,6 +55,7 @@ public enum AccumulateNullPropagationOption implements
SingleValueRuleRuntimeOpt
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/BeliefSystemTypeOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/BeliefSystemTypeOption.java
index 883527a49c0..2b99fdc452f 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/BeliefSystemTypeOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/BeliefSystemTypeOption.java
@@ -65,6 +65,7 @@ public class BeliefSystemTypeOption implements
SingleValueRuleRuntimeOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/ClockTypeOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/ClockTypeOption.java
index 7bda9ec00cc..b5a93eea309 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/ClockTypeOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/ClockTypeOption.java
@@ -68,6 +68,7 @@ public class ClockTypeOption implements
SingleValueKieSessionOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/DirectFiringOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/DirectFiringOption.java
index bfb312b3074..2610ae26bf0 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/DirectFiringOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/DirectFiringOption.java
@@ -56,6 +56,7 @@ public enum DirectFiringOption implements
SingleValueRuleRuntimeOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/KeepReferenceOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/KeepReferenceOption.java
index 106c3be1810..3cb589f8ecd 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/KeepReferenceOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/KeepReferenceOption.java
@@ -51,6 +51,7 @@ public enum KeepReferenceOption implements
SingleValueKieSessionOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/PersistedSessionOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/PersistedSessionOption.java
index d802c2079cd..5275fbf1406 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/PersistedSessionOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/PersistedSessionOption.java
@@ -86,6 +86,7 @@ public class PersistedSessionOption implements
SingleValueKieSessionOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/QueryListenerOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/QueryListenerOption.java
index 0f985f862d0..1028fddbda0 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/QueryListenerOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/QueryListenerOption.java
@@ -52,6 +52,7 @@ public enum QueryListenerOption implements
SingleValueRuleRuntimeOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/ThreadSafeOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/ThreadSafeOption.java
index 7489857249f..e259730cb8f 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/ThreadSafeOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/ThreadSafeOption.java
@@ -56,6 +56,7 @@ public enum ThreadSafeOption implements
SingleValueRuleRuntimeOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/TimedRuleExecutionOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/TimedRuleExecutionOption.java
index 1ec55783c4a..84b0d71486e 100644
---
a/kie-api/src/main/java/org/kie/api/runtime/conf/TimedRuleExecutionOption.java
+++
b/kie-api/src/main/java/org/kie/api/runtime/conf/TimedRuleExecutionOption.java
@@ -38,6 +38,7 @@ public class TimedRuleExecutionOption implements
SingleValueRuleRuntimeOption {
this.filter = filter;
}
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/TimerJobFactoryOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/TimerJobFactoryOption.java
index 60e4fa800e4..98c3b31f0e5 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/TimerJobFactoryOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/TimerJobFactoryOption.java
@@ -65,6 +65,7 @@ public class TimerJobFactoryOption implements
SingleValueKieSessionOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/conf/WorkItemHandlerOption.java
b/kie-api/src/main/java/org/kie/api/runtime/conf/WorkItemHandlerOption.java
index d8b4fb324b4..ac2f7246fa9 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/conf/WorkItemHandlerOption.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/conf/WorkItemHandlerOption.java
@@ -69,6 +69,7 @@ public class WorkItemHandlerOption implements
MultiValueKieSessionOption {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyName() {
return PROPERTY_NAME+name;
}
diff --git
a/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java
b/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java
index 9c00b98c821..fbd0a671db6 100644
---
a/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java
+++
b/kie-api/src/main/java/org/kie/api/runtime/process/NodeInstanceContainer.java
@@ -39,6 +39,10 @@ public interface NodeInstanceContainer {
* within this container and are serializable
*
* @return the list of serializable node instances currently active
+ * @since 10.1.0
+ * @apiNote When implementing custom node instances, override this method
to exclude
+ * non-serializable instances if your process needs to support
persistence.
+ * The default implementation returns all node instances.
*/
default Collection<NodeInstance> getSerializableNodeInstances() {
return getNodeInstances(); // defaulting to getNodeInstances to avoid
breaking
diff --git a/kie-api/src/main/java/org/kie/api/runtime/rule/EntryPoint.java
b/kie-api/src/main/java/org/kie/api/runtime/rule/EntryPoint.java
index c8e52d48d84..778d775b015 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/rule/EntryPoint.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/rule/EntryPoint.java
@@ -69,8 +69,11 @@ public interface EntryPoint {
* Retracts the fact for which the given FactHandle was assigned.
*
* @param handle the handle whose fact is to be retracted.
- * @deprecated use {@link #delete(FactHandle)}
+ * @deprecated since 7.0.0, use {@link #delete(FactHandle)} instead. The
{@code delete} method
+ * provides clearer semantics and aligns with standard
terminology for removing facts
+ * from the working memory.
*/
+ @Deprecated(since = "7.0.0", forRemoval = true)
void retract(FactHandle handle);
/**
diff --git a/kie-api/src/main/javadoc/overview.html
b/kie-api/src/main/javadoc/overview.html
index c4e08bd1132..18099a6db70 100644
--- a/kie-api/src/main/javadoc/overview.html
+++ b/kie-api/src/main/javadoc/overview.html
@@ -20,12 +20,13 @@
<body>
<p>
- KIE provides a knowledge-centric API, where rules and processes are first
class citizens. The majority of KIE API
- is considered stable and should not change, experimental classes and APIs
will be marked as such.
+ Apache KIE provides a knowledge-centric API where rules and processes are
first-class citizens. The majority of the KIE API
+ is considered stable and should not change; experimental classes and APIs
will be marked as such.
</p>
<p>
The most common interfaces you will use are:
+</p>
<ul>
<li><code>org.kie.api.KieBase</code></li>
<li><code>org.kie.api.runtime.KieSession</code></li>
@@ -34,23 +35,21 @@
<li><code>org.kie.api.builder.ReleaseId</code></li>
<li><code>org.kie.api.builder.KieScanner</code></li>
</ul>
-</p>
<p>
- Factory classes, with static methods, provide instances of the above
interfaces. A pluggable provider approach is used
- to allow provider implementations to
- be wired up to the factories at runtime. The Factories you will most
commonly use are:
+ Factory classes with static methods provide instances of the above
interfaces. A pluggable provider approach is used
+ to allow provider implementations to be wired up to the factories at
runtime. The factories you will most commonly use are:
+</p>
<ul>
<li><code>org.kie.api.KieServices</code></li>
<li><code>org.kie.api.command.KieCommands</code></li>
<li><code>org.kie.api.io.KieResources</code></li>
</ul>
-</p>
<p>
- Typical example of loading and using knowledge resources (rules, processes,
etc) found on classpath. By convention the
- KIE API expects file <code>META-INF/kmodule.xml</code> which is a marker
file and also enables additional configuration.
- For very basic usage the file can just contain <code><kmodule
xmlns="http://www.drools.org/xsd/kmodule"/></code>:
+ A typical example of loading and using knowledge resources (rules, processes
and decisions) found on the classpath: By convention, the
+ KIE API expects the file <code>META-INF/kmodule.xml</code>, which is a
marker file that also enables additional configuration.
+ For very basic usage, the file can contain just <code><kmodule
xmlns="http://www.drools.org/xsd/kmodule"/></code>:
<pre>
KieServices kieServices = KieServices.Factory.get();
KieContainer kieContainer = kieServices.getKieClasspathContainer();
@@ -65,8 +64,9 @@
</p>
<p>
- Drools 8 introduced Rule Unit API as a recommended style which provides an
atomic module defining a set of rules and a set of strongly typed
+ Drools 8 introduced the Rule Unit API, which provides an atomic module
defining a set of rules and a set of strongly-typed
data sources:
+</p>
<pre>
MeasurementUnit measurementUnit = new MeasurementUnit();
RuleUnitInstance<MeasurementUnit> instance =
RuleUnitProvider.get().createRuleUnitInstance(measurementUnit);
@@ -77,6 +77,4 @@
instance.dispose();
}
</pre>
-</p>
-
</body>
diff --git
a/kie-api/src/test/java/org/kie/api/internal/utils/KieServiceTest.java
b/kie-api/src/test/java/org/kie/api/internal/utils/KieServiceTest.java
new file mode 100644
index 00000000000..b80c5989e83
--- /dev/null
+++ b/kie-api/src/test/java/org/kie/api/internal/utils/KieServiceTest.java
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.internal.utils;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+/**
+ * Unit tests for KieService interface logic including priority-based
comparison,
+ * service tag handling, and default method implementations.
+ */
+class KieServiceTest {
+
+ /**
+ * Test that default servicePriority returns 0
+ */
+ @Test
+ void testDefaultServicePriority() {
+ KieService service = new TestKieService();
+ assertThat(service.servicePriority()).isEqualTo(0);
+ }
+
+ /**
+ * Test that default serviceTag returns UNDEFINED
+ */
+ @Test
+ void testDefaultServiceTag() {
+ KieService service = new TestKieService();
+ assertThat(service.serviceTag()).isEqualTo(KieService.UNDEFINED);
+ }
+
+ /**
+ * Test that custom servicePriority can be overridden
+ */
+ @Test
+ void testCustomServicePriority() {
+ KieService service = new TestKieServiceWithPriority(100);
+ assertThat(service.servicePriority()).isEqualTo(100);
+ }
+
+ /**
+ * Test that custom serviceTag can be overridden
+ */
+ @Test
+ void testCustomServiceTag() {
+ KieService service = new TestKieServiceWithTag("custom-tag");
+ assertThat(service.serviceTag()).isEqualTo("custom-tag");
+ }
+
+ /**
+ * Test compareTo with different priorities - lower priority should be
"less than"
+ */
+ @Test
+ void testCompareToWithDifferentPriorities() {
+ KieService lowPriority = new TestKieServiceWithPriority(10);
+ KieService highPriority = new TestKieServiceWithPriority(20);
+
+ // Lower priority value should be "less than" higher priority value
+ assertThat(lowPriority.compareTo(highPriority)).isNegative();
+ assertThat(highPriority.compareTo(lowPriority)).isPositive();
+ }
+
+ /**
+ * Test compareTo with same priorities throws IllegalStateException
+ */
+ @Test
+ void testCompareToWithSamePriorityThrowsException() {
+ KieService service1 = new TestKieServiceWithPriority(10);
+ KieService service2 = new TestKieServiceWithPriority(10);
+
+ assertThatThrownBy(() -> service1.compareTo(service2))
+ .isInstanceOf(IllegalStateException.class)
+ .hasMessageContaining("Found 2 services with same priority
(10)")
+ .hasMessageContaining(service1.getClass().getCanonicalName())
+ .hasMessageContaining(service2.getClass().getCanonicalName());
+ }
+
+ /**
+ * Test compareTo with default priorities (both 0) throws
IllegalStateException
+ */
+ @Test
+ void testCompareToWithDefaultPrioritiesThrowsException() {
+ KieService service1 = new TestKieService();
+ KieService service2 = new TestKieService();
+
+ assertThatThrownBy(() -> service1.compareTo(service2))
+ .isInstanceOf(IllegalStateException.class)
+ .hasMessageContaining("Found 2 services with same priority
(0)");
+ }
+
+ /**
+ * Test compareTo ordering - services should be ordered by priority
(ascending)
+ */
+ @Test
+ void testCompareToOrdering() {
+ KieService priority5 = new TestKieServiceWithPriority(5);
+ KieService priority10 = new TestKieServiceWithPriority(10);
+ KieService priority15 = new TestKieServiceWithPriority(15);
+
+ // Verify ordering: 5 < 10 < 15
+ assertThat(priority5.compareTo(priority10)).isNegative();
+ assertThat(priority10.compareTo(priority15)).isNegative();
+ assertThat(priority5.compareTo(priority15)).isNegative();
+
+ // Verify reverse ordering: 15 > 10 > 5
+ assertThat(priority15.compareTo(priority10)).isPositive();
+ assertThat(priority10.compareTo(priority5)).isPositive();
+ assertThat(priority15.compareTo(priority5)).isPositive();
+ }
+
+ /**
+ * Test compareTo with negative priorities
+ */
+ @Test
+ void testCompareToWithNegativePriorities() {
+ KieService negativePriority = new TestKieServiceWithPriority(-10);
+ KieService positivePriority = new TestKieServiceWithPriority(10);
+ KieService zeroPriority = new TestKieServiceWithPriority(0);
+
+ // Negative priority should have highest precedence
+ assertThat(negativePriority.compareTo(zeroPriority)).isNegative();
+ assertThat(negativePriority.compareTo(positivePriority)).isNegative();
+ assertThat(zeroPriority.compareTo(positivePriority)).isNegative();
+ }
+
+ /**
+ * Test that UNDEFINED constant has expected value
+ */
+ @Test
+ void testUndefinedConstant() {
+ assertThat(KieService.UNDEFINED).isEqualTo("undefined");
+ }
+
+ /**
+ * Test service with both custom priority and tag
+ */
+ @Test
+ void testServiceWithPriorityAndTag() {
+ KieService service = new TestKieServiceWithPriorityAndTag(50,
"production");
+ assertThat(service.servicePriority()).isEqualTo(50);
+ assertThat(service.serviceTag()).isEqualTo("production");
+ }
+
+ /**
+ * Test compareTo is consistent with priority difference
+ */
+ @Test
+ void testCompareToConsistency() {
+ KieService service1 = new TestKieServiceWithPriority(10);
+ KieService service2 = new TestKieServiceWithPriority(20);
+
+ int result = service1.compareTo(service2);
+ assertThat(result).isEqualTo(10 - 20); // Should be -10
+ }
+
+ // Test helper classes
+
+ /**
+ * Basic test implementation with default priority and tag
+ */
+ private static class TestKieService implements KieService {
+ }
+
+ /**
+ * Test implementation with custom priority
+ */
+ private static class TestKieServiceWithPriority implements KieService {
+ private final int priority;
+
+ public TestKieServiceWithPriority(int priority) {
+ this.priority = priority;
+ }
+
+ @Override
+ public int servicePriority() {
+ return priority;
+ }
+ }
+
+ /**
+ * Test implementation with custom tag
+ */
+ private static class TestKieServiceWithTag implements KieService {
+ private final String tag;
+
+ public TestKieServiceWithTag(String tag) {
+ this.tag = tag;
+ }
+
+ @Override
+ public String serviceTag() {
+ return tag;
+ }
+ }
+
+ /**
+ * Test implementation with both custom priority and tag
+ */
+ private static class TestKieServiceWithPriorityAndTag implements
KieService {
+ private final int priority;
+ private final String tag;
+
+ public TestKieServiceWithPriorityAndTag(int priority, String tag) {
+ this.priority = priority;
+ this.tag = tag;
+ }
+
+ @Override
+ public int servicePriority() {
+ return priority;
+ }
+
+ @Override
+ public String serviceTag() {
+ return tag;
+ }
+ }
+}
\ No newline at end of file
diff --git a/kie-parent/pom.xml b/kie-parent/pom.xml
index 80595e4b7ff..c47c1b8674c 100644
--- a/kie-parent/pom.xml
+++ b/kie-parent/pom.xml
@@ -182,6 +182,7 @@
<version.jakarta.validation-api>3.1.1</version.jakarta.validation-api>
<version.jakarta.ws.rs>3.1.0</version.jakarta.ws.rs>
<version.jakarta.xml.bind-api>4.0.4</version.jakarta.xml.bind-api>
+ <version.japicmp.maven.plugin>0.18.3</version.japicmp.maven.plugin>
<version.javax.inject>1</version.javax.inject>
<version.jaxb2-maven-plugin>2.2</version.jaxb2-maven-plugin>
<!-- JDepend plugin -->
@@ -196,7 +197,7 @@
<!-- These are added as part of the migration from JBoss to Apache parent
pom.xml. They may be extracted to a KIE parent bom. -->
<version.maven-checkstyle>3.3.0</version.maven-checkstyle>
<version.maven.enforcer>3.3.0</version.maven.enforcer>
-
<version.maven-javadoc-plugin.override>3.6.2</version.maven-javadoc-plugin.override>
+ <version.maven-javadoc-plugin>3.12.0</version.maven-javadoc-plugin>
<!-- Note: following ones are two different plugins -->
<version.maven.invoker>3.2.0</version.maven.invoker>
<version.maven-invoker-plugin>3.6.1</version.maven-invoker-plugin>
@@ -324,6 +325,8 @@
<version.plugin.testing.harness>4.0.0-alpha-2</version.plugin.testing.harness>
<version.project-sources-maven-plugin>0.3</version.project-sources-maven-plugin>
<version.property-maven-plugin>1.2.1</version.property-maven-plugin>
+ <version.revapi.maven.plugin>0.15.1</version.revapi.maven.plugin>
+ <version.revapi.java>0.28.1</version.revapi.java>
<!-- OpenRewrite plugin -->
<version.rewrite.maven.plugin>4.42.0</version.rewrite.maven.plugin>
<version.rewrite.testing.frameworks>1.22.0</version.rewrite.testing.frameworks>
@@ -338,7 +341,30 @@
<version.wildfly-maven-plugin>1.2.0.Final</version.wildfly-maven-plugin>
<version.xerces>2.12.2</version.xerces>
<version.xml-maven-plugin>1.0</version.xml-maven-plugin>
+
+ <!-- Javadoc branding properties - can be overridden via -D flags or CI
environment -->
+ <maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
+ <javadoc.product.name>${project.name}</javadoc.product.name>
+ <javadoc.product.version>${project.version}</javadoc.product.version>
+ <javadoc.doctitle>${project.name} ${project.version} API</javadoc.doctitle>
+ <javadoc.windowtitle>${project.name} ${project.version}
API</javadoc.windowtitle>
+ <javadoc.footer><![CDATA[Copyright ©
${project.inceptionYear}‣${maven.build.timestamp} Apache Software
Foundation. All rights reserved.]]></javadoc.footer>
+ <javadoc.bottom><![CDATA[Copyright ©
${project.inceptionYear}‣${maven.build.timestamp} Apache Software
Foundation. All rights reserved.]]></javadoc.bottom>
+
+ <!-- Latest released Apache KIE version for API compatibility checks -->
+ <kie.latest.released.version>10.2.0</kie.latest.released.version>
+
+ <!-- Revapi API Compatibility Check Configuration -->
+
+ <revapi.latestVersion>${kie.latest.released.version}</revapi.latestVersion>
+
+ <!-- JApiCmp API Compatibility Check Configuration -->
+
+ <japicmp.oldVersion.groupId>${project.groupId}</japicmp.oldVersion.groupId>
+
<japicmp.oldVersion.artifactId>${project.artifactId}</japicmp.oldVersion.artifactId>
+
<japicmp.oldVersion.version>${kie.latest.released.version}</japicmp.oldVersion.version>
</properties>
+
<dependencyManagement>
<dependencies>
<dependency>
@@ -2669,6 +2695,18 @@
</execution>-->
</executions>
</plugin>
+ <plugin>
+ <groupId>org.revapi</groupId>
+ <artifactId>revapi-maven-plugin</artifactId>
+ <version>${version.revapi.maven.plugin}</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.revapi</groupId>
+ <artifactId>revapi-java</artifactId>
+ <version>${version.revapi.java}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
@@ -3015,16 +3053,21 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>${version.maven-javadoc-plugin.override}</version>
+ <version>${version.maven-javadoc-plugin}</version>
<configuration>
<header><![CDATA[<b>${project.name}
${project.version}</b>]]></header>
- <footer><![CDATA[<b>${project.name}
${project.version}</b>]]></footer>
<archive>
<index>true</index>
</archive>
<quiet>true</quiet>
<doclint>none</doclint>
- <legacyMode>true</legacyMode>
+ <tags>
+ <tag>
+ <name>apiNote</name>
+ <placement>a</placement>
+ <head>API Note:</head>
+ </tag>
+ </tags>
</configuration>
</plugin>
<plugin>
@@ -3252,22 +3295,7 @@
</execution>
</executions>
</plugin>-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>jar</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <source>${maven.compiler.release}</source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ </plugins>
</build>
</profile>
<!--
diff --git
a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-evaluator/pom.xml
b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-evaluator/pom.xml
index b44999edd38..06a4c326b10 100644
---
a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-evaluator/pom.xml
+++
b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-evaluator/pom.xml
@@ -75,6 +75,7 @@
<groupId>org.kie</groupId>
<artifactId>kie-pmml-compiler-api</artifactId>
<classifier>tests</classifier>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie</groupId>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]