From a9335c9b88a985f2b503b828748d62bca894aaee Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti Date: Wed, 6 Sep 2023 18:44:34 +0200 Subject: [PATCH] [KOGITO-9786] Default port should be calculated by RestWorkItemHandler --- .../serverless/workflow/parser/types/RestTypeHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kogito-serverless-workflow/kogito-serverless-workflow-rest-parser/src/main/java/org/kie/kogito/serverless/workflow/parser/types/RestTypeHandler.java b/kogito-serverless-workflow/kogito-serverless-workflow-rest-parser/src/main/java/org/kie/kogito/serverless/workflow/parser/types/RestTypeHandler.java index a5642397b69..a2803a995e6 100644 --- a/kogito-serverless-workflow/kogito-serverless-workflow-rest-parser/src/main/java/org/kie/kogito/serverless/workflow/parser/types/RestTypeHandler.java +++ b/kogito-serverless-workflow/kogito-serverless-workflow-rest-parser/src/main/java/org/kie/kogito/serverless/workflow/parser/types/RestTypeHandler.java @@ -64,7 +64,7 @@ public class RestTypeHandler extends WorkItemTypeHandler { .workParameter(RestWorkItemHandler.PASSWORD, runtimeRestApi(functionDef, PASSWORD_PROP, context.getContext())) .workParameter(RestWorkItemHandler.HOST, runtimeRestApi(functionDef, "host", context.getContext())) .workParameter(RestWorkItemHandler.PORT, runtimeRestApi(functionDef, PORT, context.getContext(), Integer.class, - context.getContext().getApplicationProperty(APP_PROPERTIES_FUNCTIONS_BASE + PORT).map(Integer::parseInt).orElse(RestWorkItemHandler.DEFAULT_PORT))) + context.getContext().getApplicationProperty(APP_PROPERTIES_FUNCTIONS_BASE + PORT).map(Integer::parseInt).orElse(null))) .workParameter(RestWorkItemHandler.BODY_BUILDER, new ParamsRestBodyBuilderSupplier()) .workParameter(BearerTokenAuthDecorator.BEARER_TOKEN, runtimeRestApi(functionDef, ACCESS_TOKEN, context.getContext())) .workParameter(ApiKeyAuthDecorator.KEY_PREFIX, runtimeRestApi(functionDef, API_KEY_PREFIX, context.getContext()))