You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: schema/retries.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -37,15 +37,15 @@
37
37
},
38
38
"delay": {
39
39
"type": "string",
40
-
"description": "Time delay between retry attempts (ISO 8601 duration format)"
40
+
"description": "Time delay between retry attempts (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)"
41
41
},
42
42
"maxDelay": {
43
43
"type": "string",
44
-
"description": "Maximum time delay between retry attempts (ISO 8601 duration format)"
44
+
"description": "Maximum time delay between retry attempts (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)"
45
45
},
46
46
"increment": {
47
47
"type": "string",
48
-
"description": "Static value by which the delay increases during each attempt (ISO 8601 time format)"
48
+
"description": "Time delay increment during each attempt (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)"
49
49
},
50
50
"multiplier": {
51
51
"type": [
@@ -73,7 +73,7 @@
73
73
],
74
74
"minimum": 0,
75
75
"maximum": 1,
76
-
"description": "If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format)"
76
+
"description": "If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)"
Copy file name to clipboardExpand all lines: schema/timeouts.json
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -43,15 +43,15 @@
43
43
"oneOf": [
44
44
{
45
45
"type": "string",
46
-
"description": "Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'",
46
+
"description": "Workflow execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration). If not specified should be 'unlimited'",
47
47
"minLength": 1
48
48
},
49
49
{
50
50
"type": "object",
51
51
"properties": {
52
52
"duration": {
53
53
"type": "string",
54
-
"description": "Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'",
54
+
"description": "Workflow execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration). If not specified should be 'unlimited'",
55
55
"minLength": 1
56
56
},
57
57
"interrupt": {
@@ -74,22 +74,22 @@
74
74
},
75
75
"stateExecTimeout": {
76
76
"type": "string",
77
-
"description": "Workflow state execution timeout duration (ISO 8601 duration format)",
77
+
"description": "Workflow state execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)",
78
78
"minLength": 1
79
79
},
80
80
"actionExecTimeout": {
81
81
"type": "string",
82
-
"description": "Action execution timeout duration (ISO 8601 duration format)",
82
+
"description": "Action execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)",
83
83
"minLength": 1
84
84
},
85
85
"branchExecTimeout": {
86
86
"type": "string",
87
-
"description": "Branch execution timeout duration (ISO 8601 duration format)",
87
+
"description": "Branch execution timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)",
88
88
"minLength": 1
89
89
},
90
90
"eventTimeout": {
91
91
"type": "string",
92
-
"description": "Timeout duration to wait for consuming defined events (ISO 8601 duration format)",
92
+
"description": "Timeout duration to wait for consuming defined events (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration)",
Copy file name to clipboardExpand all lines: schema/workflow.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -174,11 +174,11 @@
174
174
"properties": {
175
175
"before": {
176
176
"type": "string",
177
-
"description": "Amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined."
177
+
"description": "Amount of time (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined."
178
178
},
179
179
"after": {
180
180
"type": "string",
181
-
"description": "Amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined."
181
+
"description": "Amount of time (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined."
182
182
}
183
183
},
184
184
"anyOf": [
@@ -663,7 +663,7 @@
663
663
},
664
664
"duration": {
665
665
"type": "string",
666
-
"description": "Duration (ISO 8601 duration format) to sleep"
666
+
"description": "Duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) to sleep"
667
667
},
668
668
"transition": {
669
669
"description": "Next transition of the workflow after the workflow sleep",
Copy file name to clipboardExpand all lines: specification.md
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -2623,7 +2623,7 @@ The `timeouts` property can be used to define state specific timeout settings. S
2623
2623
| --- | --- | --- | --- |
2624
2624
| name | Unique State name. Must follow the [Serverless Workflow Naming Convention](#naming-convention) | string | yes |
2625
2625
| type | State type | string | yes |
2626
-
| duration | Duration (ISO 8601 duration format) to sleep. For example: "PT15M"(sleep 15 minutes), or "P2DT3H4M" (sleep 2 days, 3 hours and 4 minutes) | string | yes |
2626
+
| duration | Duration (ISO 8601 literal duration or an expression which evaluation results in an ISO 8601 duration) to sleep. For example: "PT15M"(sleep 15 minutes), or "P2DT3H4M" (sleep 2 days, 3 hours and 4 minutes), or $CONST.timeout, where timeout value is "PT15M" | string | yes |
2627
2627
| [transition](#Transitions) | Next transition of the workflow after the sleep | string or object | yes (if `end` is not defined) |
2628
2628
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
2629
2629
@@ -2665,7 +2665,7 @@ transition: get-job-status
2665
2665
2666
2666
Sleep state
2667
2667
suspends workflow execution for a given time duration. The delay is defined in its `duration` property using the ISO 8601
2668
-
duration format.
2668
+
duration format. Note that ISO 8601 can be the result of evaluating an expression.
2669
2669
2670
2670
Note that `transition` and `end` properties are mutually exclusive, meaning that you cannot define both of them at the same time.
2671
2671
##### Parallel State
@@ -4002,8 +4002,8 @@ referenced `produced` event via its `produceEventRef` property and a `consumed`
4002
4002
4003
4003
The `sleep` property can be used to define time periods that workflow execution should sleep
4004
4004
before and/or after function execution. It can have two properties:
4005
-
* `before` - defines the amount of time (ISO 8601 duration format) to sleep before function invocation.
4006
-
* `after` - defines the amount of time (ISO 8601 duration format) to sleep after function invocation.
4005
+
* `before` - defines the amount of time (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) to sleep before function invocation.
4006
+
* `after` - defines the amount of time (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) to sleep after function invocation.
4007
4007
4008
4008
Function invocation timeouts should be handled via the states [timeouts](#Workflow-Timeouts) definition.
4009
4009
@@ -4133,7 +4133,7 @@ Allows defining invocation of a function via event.
4133
4133
| --- | --- | --- | --- |
4134
4134
| [produceEventRef](#Event-Definition) | Reference to the unique name of a `produced` event definition. Must follow the [Serverless Workflow Naming Convention](#naming-convention) | string | yes |
4135
4135
| [consumeEventRef](#Event-Definition) | Reference to the unique name of a `consumed` event definition. Must follow the [Serverless Workflow Naming Convention](#naming-convention) | string | no |
4136
-
| consumeEventTimeout | Maximum amount of time (ISO 8601 format) to wait for the consume event. If not defined it be set to the [actionExecutionTimeout](#Workflow-Timeout-Definition) | string | no |
4136
+
| consumeEventTimeout | Maximum amount of time (ISO 8601 format literal or expression) to wait for the consume event. If not defined it be set to the [actionExecutionTimeout](#Workflow-Timeout-Definition) | string | no |
4137
4137
| data | If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by `produceEventRef`. If object type, a custom object to become the data (payload) of the event referenced by `produceEventRef`. | string or object | no |
4138
4138
| contextAttributes | Add additional event extension context attributes to the trigger/produced event | object | no |
4139
4139
| invoke | Specifies if the function should be invoked sync or async. Default is sync | enum | no |
@@ -4183,7 +4183,7 @@ to be used as payload of the event referenced by `produceEventRef`. If it is of
4183
4183
The `contextAttributes` property allows you to add one or more [extension context attributes](https://github.com/cloudevents/spec/blob/main/cloudevents/spec.md#extension-context-attributes)
4184
4184
to the trigger/produced event.
4185
4185
4186
-
The `consumeEventTimeout` property defines the maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it should default to the [actionExecutionTimeout](#Workflow-Timeout-Definition).
4186
+
The `consumeEventTimeout` property defines the maximum amount of time (ISO 8601 format literal or expression) to wait for the result event. If not defined it should default to the [actionExecutionTimeout](#Workflow-Timeout-Definition).
4187
4187
If the event defined by the `consumeEventRef` property is not received in that set time, action invocation should raise an error
4188
4188
that can be handled in the states `onErrors` definition. In case the `consumeEventRef` is not defined, the `consumeEventTimeout` property is ignored.
4189
4189
@@ -4340,12 +4340,12 @@ For more information, see the [Workflow Error Handling](#Workflow-Error-Handling
4340
4340
| Parameter | Description | Type | Required |
4341
4341
| --- | --- | --- | --- |
4342
4342
| name | Unique retry strategy name | string | yes |
4343
-
| delay | Time delay between retry attempts (ISO 8601 duration format) | string | no |
4343
+
| delay | Time delay between retry attempts (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | no |
4344
4344
| maxAttempts | Maximum number of retry attempts. Value of 1 means no retries are performed | string or number | yes |
4345
-
| maxDelay | Maximum amount of delay between retry attempts (ISO 8601 duration format) | string | no |
4346
-
| increment | Static duration which will be added to the delay between successive retries (ISO 8601 duration format) | string | no |
4345
+
| maxDelay | Maximum amount of delay between retry attempts (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | no |
4346
+
| increment | Static duration which will be added to the delay between successive retries (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | no |
4347
4347
| multiplier | Float value by which the delay is multiplied before each attempt. For example: "1.2"meaning that each successive delay is 20% longer than the previous delay. For example, if delay is 'PT10S', then the delay between the first and second attempts will be 10 seconds, and the delay before the third attempt will be 12 seconds. | float or string | no |
4348
-
| jitter | If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0.0 and 1.0). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format) | float or string | no |
4348
+
| jitter | If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0.0 and 1.0). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | float or string | no |
4349
4349
4350
4350
<details><summary><strong>Click to view example definition</strong></summary>
4351
4351
<p>
@@ -4389,9 +4389,9 @@ defined state [actions](#Action-Definition).
4389
4389
The `name` property specifies the unique name of the retry definition (strategy). This unique name
4390
4390
can be referred by workflow states [error definitions](#Error-Definition).
4391
4391
4392
-
The `delay` property specifies the initial time delay between retry attempts (ISO 8601 duration format).
4392
+
The `delay` property specifies the initial time delay between retry attempts (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration).
4393
4393
4394
-
The `increment` property specifies a static duration which will be added to the delay between successive retries.
4394
+
The `increment` property specifies a duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) which will be added to the delay between successive retries.
4395
4395
To explain this better, let's say we have the following retry definition:
4396
4396
4397
4397
```json
@@ -4441,7 +4441,7 @@ a `jitter` value of 0.3, a random amount of time between 0 and 1.8 (0.3 times 6)
4441
4441
from the calculated delay.
4442
4442
4443
4443
Alternatively, `jitter` may be defined as an absolute value specified as an ISO
4444
-
8601 duration. This way, the maximum amount of random time added is fixed and
4444
+
8601 duration (literal or expression). This way, the maximum amount of random time added is fixed and
4445
4445
will not increase as new attempts are made.
4446
4446
4447
4447
The `maxDelay` property determines the maximum amount of delay that is desired between retry attempts, and is applied
@@ -4922,7 +4922,7 @@ it with its `object` type which has the following properties:
4922
4922
| Parameter | Description | Type | Required |
4923
4923
| --- | --- | --- | --- |
4924
4924
| expression | Cron expression describing when the workflow instance should be created (automatically) | string | yes |
4925
-
| validUntil | Specific date and time (ISO 8601 format) when the cron expression is no longer valid | string | no |
4925
+
| validUntil | Specific date and time (ISO 8601 format, literal or expression producing it) when the cron expression is no longer valid | string | no |
4926
4926
4927
4927
<details><summary><strong>Click to view example definition</strong></summary>
The `expression` property is a a [cron expression](http://crontab.org/) which defines
4960
4960
when workflow instances should be created (automatically).
4961
4961
4962
-
The `validUntil` property defines a date and time (using ISO 8601 format). When the
4962
+
The `validUntil` property defines a date and time (using ISO 8601 format, literal or expression). When the
4963
4963
`validUntil`time is reached, the cron expression for instances creations of this workflow
4964
4964
should no longer be valid.
4965
4965
@@ -5653,11 +5653,11 @@ If `object` type, it is used to define the timeout definitions in-line and has t
5653
5653
5654
5654
| Parameter | Description | Type | Required |
5655
5655
| --- | --- | --- | --- |
5656
-
| [workflowExecTimeout](#workflowexectimeout-definition) | Workflow execution timeout (ISO 8601 duration format) | string or object | no |
5657
-
| [stateExecTimeout](#states-timeout-definition) | Workflow state execution timeout (ISO 8601 duration format) | string | no |
5658
-
| actionExecTimeout | Actions execution timeout (ISO 8601 duration format) | string | no |
5659
-
| [branchExecTimeout](#branch-timeout-definition) | Branch execution timeout (ISO 8601 duration format) | string | no |
5660
-
| [eventTimeout](#event-timeout-definition) | Default timeout for consuming defined events (ISO 8601 duration format) | string | no |
5656
+
| [workflowExecTimeout](#workflowexectimeout-definition) | Workflow execution timeout (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string or object | no |
5657
+
| [stateExecTimeout](#states-timeout-definition) | Workflow state execution timeout (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | no |
5658
+
| actionExecTimeout | Actions execution timeout (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | no |
5659
+
| [branchExecTimeout](#branch-timeout-definition) | Branch execution timeout (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | no |
5660
+
| [eventTimeout](#event-timeout-definition) | Default timeout for consuming defined events (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | no |
5661
5661
5662
5662
The `eventTimeout` property defines the maximum amount of time to wait to consume defined events. If not specified it should default to
5663
5663
"unlimited".
@@ -5682,7 +5682,7 @@ If Object type it has the following format:
| duration | Timeout duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration) | string | yes |
5686
5686
| interrupt | If `false`, workflow instance is allowed to finish current execution. If `true`, current workflow execution is stopped immediately. Default is `false` | boolean | no |
5687
5687
| runBefore | Name of a workflow state to be executed before workflow instance is terminated | string | no |
5688
5688
@@ -5747,7 +5747,7 @@ timeout settings are available for each state type.
5747
5747
Workflow states timeouts cannot define the `workflowExecTimeout` property.
5748
5748
5749
5749
Workflow states can set their `stateExecTimeout` property inside the `timeouts` definition.
5750
-
The value of this property is a time duration (ISO 8601 duration format).
5750
+
The value of this property is a time duration (literal ISO 8601 duration format or expression which evaluation results in an ISO 8601 duration).
5751
5751
It must be a duration that's greater than zero and defines the total state execution timeout.
5752
5752
When this timeout is reached, state execution
5753
5753
should be stopped and can be handled as a timeout error in the states `onErrors` definition.
0 commit comments