jstastny-cz commented on code in PR #4151:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4151#discussion_r2622825453
##########
quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment/src/main/java/org/kie/kogito/quarkus/workflow/deployment/config/KogitoWorkflowBuildTimeConfig.java:
##########
@@ -18,24 +18,28 @@
*/
package org.kie.kogito.quarkus.workflow.deployment.config;
-import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
+import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefault;
+import io.smallrye.config.WithName;
-@ConfigRoot(name = "kogito", phase = ConfigPhase.BUILD_TIME)
-public class KogitoWorkflowBuildTimeConfig {
+@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
+@ConfigMapping(prefix = "kogito")
+public interface KogitoWorkflowBuildTimeConfig {
/**
* Configuration for DevServices. DevServices allows Quarkus to
automatically start Data Index in dev and test mode.
*/
- @ConfigItem
- public KogitoDevServicesBuildTimeConfig devservices;
+ @WithName("devServices")
+ KogitoDevServicesBuildTimeConfig devservicesConfig();
Review Comment:
Looking at usages of this, in other places we tend to consider dev and
services 2 words, so this would align:
```suggestion
KogitoDevServicesBuildTimeConfig devServicesConfig();
```
##########
quarkus/addons/events/process/runtime/src/main/java/org/kie/kogito/events/config/EventsRuntimeConfig.java:
##########
@@ -18,71 +18,55 @@
*/
package org.kie.kogito.events.config;
-import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
+import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefault;
+import io.smallrye.config.WithName;
-@ConfigRoot(prefix = "kogito", name = "events", phase = ConfigPhase.RUN_TIME)
-public class EventsRuntimeConfig {
+@ConfigRoot(phase = ConfigPhase.RUN_TIME)
+@ConfigMapping(prefix = "kogito.events")
+public interface EventsRuntimeConfig {
/**
* Enable publishing processes instances events
*/
- @ConfigItem(name = "processinstances.enabled", defaultValue = "true")
- boolean processInstancesEventsEnabled;
+ @WithName("processinstances.enabled")
+ @WithDefault("true")
+ boolean processInstancesEventsEnabled();
/**
* Propagate errors for process instance emitter
*/
- @ConfigItem(name = "processinstances.errors.propagate", defaultValue =
"false")
- boolean processInstancesPropagate;
+ @WithName("processinstances.errors.propagate")
+ @WithDefault("false")
+ boolean propagateProcessInstancesEvents();
Review Comment:
the property name `processinstances.errors.propagate` - to me it would make
more sense for the method name to be as close as possible, thus Events->Errors,
also applicable to `processdefinitions.errors.propagate` and
`usertasks.errors.propagate`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]