Skip to content

Commit

Permalink
[incubator-kie-issues#1500] Add javadoc to kogito properties (apache#…
Browse files Browse the repository at this point in the history
…3685)

* [incubator-kie-issues#1500] Add javadoc to kogito properties

* [incubator-kie-issues#1450] Include CI hack inside kie-addons-quarkus-process-dynamic-integration-tests pom to avoid io.quarkus.bootstrap.BootstrapException: Failed to create the application model for org.kie:kie-addons-quarkus-process-dynamic-integration-tests::jar:999-SNAPSHOT error

---------

Co-authored-by: Gabriele-Cardosi <[email protected]>
  • Loading branch information
2 people authored and rgdoliveira committed Oct 3, 2024
1 parent 3d9eea4 commit e5a4278
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public interface Generator {
GeneratedFileType REST_TYPE = GeneratedFileType.of("REST", GeneratedFileType.Category.SOURCE, true, true);
GeneratedFileType MODEL_TYPE = GeneratedFileType.of("MODEL", GeneratedFileType.Category.SOURCE, true, true);

/**
* kogito.codegen.(engine_name) -> (boolean) enable/disable engine code generation (default true)
*/
String CONFIG_PREFIX = "kogito.codegen.";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
public class GeneratorConfig {

/**
* the type of generated rest (currently used only by processes); possible values: reactive; (default is empty)
*/
public static final String KOGITO_REST_RESOURCE_TYPE_PROP = "kogito.rest.resource.type";

private GeneratorConfig() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,38 @@ public class DecisionCodegen extends AbstractGenerator {
public static final Logger LOGGER = LoggerFactory.getLogger(DecisionCodegen.class);
public static final String GENERATOR_NAME = "decisions";

/**
* (boolean) generate java classes to support strongly typed input (default false)
*/
public static String STRONGLY_TYPED_CONFIGURATION_KEY = "kogito.decisions.stronglytyped";
/**
* model validation strategy; possible values: ENABLED, DISABLED, IGNORE; (default ENABLED)
*/
public static String VALIDATION_CONFIGURATION_KEY = "kogito.decisions.validation";

/**
* (string) kafka bootstrap server address
*/
public static final String KOGITO_ADDON_TRACING_DECISION_KAFKA_BOOTSTRAPADDRESS = "kogito.addon.tracing.decision.kafka.bootstrapAddress";
/**
* (string) name of the decision topic; default to kogito-tracing-decision
*/
public static final String KOGITO_ADDON_TRACING_DECISION_KAFKA_TOPIC_NAME = "kogito.addon.tracing.decision.kafka.topic.name";
/**
* (integer) number of decision topic partitions; default to 1
*/
public static final String KOGITO_ADDON_TRACING_DECISION_KAFKA_TOPIC_PARTITIONS = "kogito.addon.tracing.decision.kafka.topic.partitions";

/**
* (integer) number of decision topic replication factor; default to 1
*/
public static final String KOGITO_ADDON_TRACING_DECISION_KAFKA_TOPIC_REPLICATION_FACTOR = "kogito.addon.tracing.decision.kafka.topic.replicationFactor";

/**
* (boolean) enable/disable asynchronous collection of decision events; default to true
*/
public static final String KOGITO_ADDON_TRACING_DECISION_ASYNC_ENABLED = "kogito.addon.tracing.decision.asyncEnabled";

public static DecisionCodegen ofCollectedResources(KogitoBuildContext context, Collection<CollectedResource> resources) {
OASFactoryResolver.instance(); // manually invoke SPI, o/w Kogito CodeGen Kogito Quarkus extension failure at NewFileHotReloadTest due to java.util.ServiceConfigurationError: org.eclipse.microprofile.openapi.spi.OASFactoryResolver: io.smallrye.openapi.spi.OASFactoryResolverImpl not a subtype
List<CollectedResource> dmnResources = resources.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,19 @@ public class PersistenceGenerator extends AbstractGenerator {
* Kogito persistence properties
*/
// Generic
/**
* (boolean) enable/disable proto generation for DATA-INDEX; default to true
*/
public static final String KOGITO_PERSISTENCE_DATA_INDEX_PROTO_GENERATION = "kogito.persistence.data-index.proto.generation";
public static final String KOGITO_PERSISTENCE_DATA_INDEX_PROTO_GENERATION_DEFAULT = "true";
/**
* (boolean) enable/disable proto marshaller generation; default to true
*/
public static final String KOGITO_PERSISTENCE_PROTO_MARSHALLER = "kogito.persistence.proto.marshaller";
public static final String KOGITO_PERSISTENCE_PROTO_MARSHALLER_DEFAULT = "true";
/**
* (string) kind of persistence used; possible values: filesystem, infinispan, mongodb, postgresql, kafka, jdbc; default to infinispan
*/
public static final String KOGITO_PERSISTENCE_TYPE = "kogito.persistence.type";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,17 @@
public final class NamedRuleUnitConfig {

private static String CONFIG_PREFIX = "kogito.rules.";
/**
* (string) kind of event processing type for a given rule-unit; possible values: CLOUD, STREAM; default is null
*/
private static String CONFIG_EVENT_PROCESSING_TYPE = CONFIG_PREFIX + "\"%s\".event-processing-type";
/**
* (string) kind of event clock type for a given rule-unit; possible values: PSEUDO, REALTIME; default is null
*/
private static String CONFIG_CLOCK_TYPE = CONFIG_PREFIX + "\"%s\".clock-type";
/**
* (integer) size of session poolfor a given rule-unit; possible values; default is null
*/
private static String CONFIG_SESSIONS_POOL = CONFIG_PREFIX + "\"%s\".sessions-pool";

public static List<NamedRuleUnitConfig> fromContext(KogitoBuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@

public class WorkflowOperationIdFactoryProvider {

/**
* (string) strategy for generating the configuration key of open API specifications; possible values are:
* file_name: uses the last element of the spec uri
* full_uri: uses the full path of the uri
* spec_title: uses the spec title
* function_name: uses the function name
*
*/
public static final String PROPERTY_NAME = "kogito.sw.operationIdStrategy";

private static final Map<String, WorkflowOperationIdFactory> operationIds = new HashMap<>();
Expand Down
14 changes: 14 additions & 0 deletions quarkus/addons/dynamic/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<!-- hack for CI to work -->
<dependency>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
@ApplicationScoped
public class KogitoBeanProducer {

/**
* (string) strategy to resolve a Process version to use; possible values: project, workflow; if "project", requires project GAV; default is workflow
*/
public static final String KOGITO_WORKFLOW_VERSION_STRATEGY = "kogito.workflow.version-strategy";

@DefaultBean
@Produces
CorrelationService correlationService() {
Expand Down

0 comments on commit e5a4278

Please sign in to comment.