From 78fe708ddc273c899589becde1e6c5bed7e86ae5 Mon Sep 17 00:00:00 2001 From: Walter Medvedeo Date: Sat, 9 Mar 2024 16:37:10 +0100 Subject: [PATCH] kie-kogito-runtimes-3388: Improve serverless workflows timeouts duration validation message --- .../serverless/workflow/utils/TimeoutsConfigResolver.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/utils/TimeoutsConfigResolver.java b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/utils/TimeoutsConfigResolver.java index 7a8bcb52a21..1e94b74510d 100644 --- a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/utils/TimeoutsConfigResolver.java +++ b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/utils/TimeoutsConfigResolver.java @@ -30,7 +30,10 @@ public class TimeoutsConfigResolver { private static final String NON_NEGATIVE_DURATION_MUST_BE_PROVIDED = - "When configured, it must be set with a greater than zero ISO 8601 time duration. For example PT30S. Or a valid expression, for example $CONST.myDuration, where 'myDuration' is defined in the constant section of the workflow"; + "When configured, it must be set with a greater than zero ISO 8601 time duration. For example PT30S." + + " Or a valid expression, for example $CONST.myDuration, where 'myDuration' is defined in the constant section of the workflow." + + " Note: month based durations like P2M (period of two months) are not valid since the month duration might vary." + + " In that case you can use PT60D instead."; private static final String INVALID_EVENT_TIMEOUT_FOR_STATE_ERROR = "An invalid \"eventTimeout\": \"%s\" configuration was provided for the state \"%s\" in the serverless workflow: \"%s\"." + NON_NEGATIVE_DURATION_MUST_BE_PROVIDED;