diff --git a/jbpm/jbpm-flow/src/main/java/org/kie/kogito/process/validation/ValidationLogDecorator.java b/jbpm/jbpm-flow/src/main/java/org/kie/kogito/process/validation/ValidationLogDecorator.java index dddd7fdd736..8406cfdf86d 100644 --- a/jbpm/jbpm-flow/src/main/java/org/kie/kogito/process/validation/ValidationLogDecorator.java +++ b/jbpm/jbpm-flow/src/main/java/org/kie/kogito/process/validation/ValidationLogDecorator.java @@ -30,6 +30,6 @@ public ValidationLogDecorator(Map exceptions) { @Override public void decorate() { - exceptions.forEach((processId, exception) -> LOGGER.error("Invalid process: '{}'. Found error: {}", processId, exception)); + exceptions.forEach((processId, exception) -> LOGGER.error("Invalid process: '{}'", processId, exception)); } } diff --git a/kogito-build/kogito-dependencies-bom/pom.xml b/kogito-build/kogito-dependencies-bom/pom.xml index a21aae3552b..52bd83efecb 100644 --- a/kogito-build/kogito-dependencies-bom/pom.xml +++ b/kogito-build/kogito-dependencies-bom/pom.xml @@ -29,13 +29,8 @@ 2.4.10 1.0.0-preview.20220705 1.1.0 -<<<<<<< Upstream, based on main 1.3.8 - 0.0.3 -======= - 1.2.1 0.0.4 ->>>>>>> 5bfe82e [KOGITO-9614] Updating POM 1.1.5 0.0.8 1.5.2 diff --git a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/WorkflowCodeGenUtils.java b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/WorkflowCodeGenUtils.java index c63367c8ef0..c6ea7a1fcaf 100644 --- a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/WorkflowCodeGenUtils.java +++ b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/WorkflowCodeGenUtils.java @@ -91,20 +91,20 @@ private static WorkflowOperationResource getResource(Workflow workflow, Function } private static Optional getWorkflow(Path path) { - return workflowCache.computeIfAbsent(path, p -> SupportedExtensions.getSWFExtensions() - .stream() - .filter(e -> p.getFileName().toString().endsWith(e)) - .map(e -> { - try (Reader r = Files.newBufferedReader(p)) { - return Optional.of(ServerlessWorkflowUtils.getWorkflow(r, WorkflowFormat.fromFileName(p.getFileName()))); - } catch (IOException ex) { - if (ConfigProvider.getConfig().getOptionalValue(FAIL_ON_ERROR_PROPERTY, Boolean.class).orElse(true)) { - throw new UncheckedIOException(ex); - } else { - logger.error("Error reading workflow file {}", p, ex); - return Optional. empty(); - } + if (SupportedExtensions.getSWFExtensions().stream().anyMatch(ext -> path.toString().endsWith(ext))) { + return workflowCache.computeIfAbsent(path, p -> { + try (Reader r = Files.newBufferedReader(p)) { + return Optional.of(ServerlessWorkflowUtils.getWorkflow(r, WorkflowFormat.fromFileName(p.getFileName()))); + } catch (IOException ex) { + if (ConfigProvider.getConfig().getOptionalValue(FAIL_ON_ERROR_PROPERTY, Boolean.class).orElse(true)) { + throw new UncheckedIOException(ex); + } else { + logger.error("Error reading workflow file {}", p, ex); + return Optional. empty(); } - }).flatMap(Optional::stream).findFirst()); + } + }); + } + return Optional.empty(); } } diff --git a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/WorkflowAsyncAPISpecInputProvider.java b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/WorkflowAsyncAPISpecInputProvider.java index 21f3ce8b4f4..75d5c6da589 100644 --- a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/WorkflowAsyncAPISpecInputProvider.java +++ b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/WorkflowAsyncAPISpecInputProvider.java @@ -39,9 +39,9 @@ public class WorkflowAsyncAPISpecInputProvider implements AsyncAPISpecInputProvi @Override public AsyncAPISpecInput read(ConfigSourceContext context) { if (isSourceModule(context)) { - for (String dir : AsyncAPIUtils.getValues(context, "kogito.extensions.asyncAPI.scanDirs", Arrays.asList("src/main/resources", "src/test/resources"))) { + for (String dir : AsyncAPIUtils.getValues(context, "kogito.extensions.asyncAPI.scanDirs", Arrays.asList("src", "target"))) { Path rootPath = Path.of(dir); - if (Files.exists(rootPath)) { + if (Files.isDirectory(rootPath)) { try (Stream workflowFiles = Files.walk(rootPath)) { return new AsyncAPISpecInput(WorkflowCodeGenUtils .operationResources(workflowFiles, f -> f.getType() == Type.ASYNCAPI, diff --git a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/pom.xml b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/pom.xml index 8c0fe4812e9..9d7ff074e20 100644 --- a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/pom.xml +++ b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/pom.xml @@ -43,25 +43,15 @@ io.grpc grpc-netty-shaded - ${version.io.grpc} runtime io.grpc grpc-protobuf - ${version.io.grpc} io.grpc grpc-stub - ${version.io.grpc} - - - - org.apache.tomcat - annotations-api - 6.0.53 - provided