apache / incubator-kie-kogito-docs

Kogito Documentation Repository
https://kiegroup.github.io/kogito-docs/
Apache License 2.0
11 stars 58 forks source link

Document timeout format limitation #528

Closed gabriel-farache closed 7 months ago

gabriel-farache commented 8 months ago

When I try to set a timeout to 2month: P2M I get an error:

[ERROR]         [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateSources threw an exception: org.kie.kogito.codegen.process.ProcessCodegenException: Processes with errors are Invalid process: '/home/kogito/serverless-workflow-project/src/main/resources/m2k.sw.yml'. Found error: java.lang.IllegalArgumentException: An invalid "eventTimeout": "P2M" configuration was provided for the state "WaitForSaveTransformationCompletionEvent" in the serverless workflow: "Move2Kube 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

but according to https://en.wikipedia.org/wiki/ISO_8601#Durations it should be fine

To resolve ambiguity, "P1M" is a one-month duration and "PT1M" is a one-minute duration (note the time designator, T, that precedes the time value).

According to @wmedvede

a P1M (on month) in the context of the workflows can't be translated into how much time to wait. When we say 1 month, are we talking about January -> 31 days, February -> 29/28 days, etc.

So this needs to be documented

wmedvede commented 8 months ago

This issue is related to: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3388