Skip to content

Commit 45e23d5

Browse files
authored
Adding resultEventTimeout for action eventRef (#500)
* Adding resultEventTimeout for action eventRef Signed-off-by: Tihomir Surdilovic <[email protected]> * fixed typo Signed-off-by: Tihomir Surdilovic <[email protected]> * fix typo Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent 8e45f1c commit 45e23d5

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

roadmap/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ _Status description:_
2727
| ✔️| Workflow "start" no longer a required property | [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
2828
| ✔️| ForEach state "iterationParam" no longer a required property | [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
2929
| ✔️| Added "useData" for eventDataFilter, and "useResults" for actionDataFilter | [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
30+
| ✔️| Added "resultEventTimeout" for action eventref | [spec doc](https://github.com/serverlessworkflow/specification/blob/main/specification.md) |
3031
| ✏️️| Support for async action invocation | |
3132
| ✏️️| Add "completedBy" functionality | |
3233
| ✏️️| Define workflow context | |

schema/workflow.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,10 @@
527527
"type": "string",
528528
"description": "Reference to the unique name of a 'consumed' event definition"
529529
},
530+
"resultEventTimeout": {
531+
"type": "string",
532+
"description": "Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it should default to the actionExecutionTimeout"
533+
},
530534
"data": {
531535
"type": [
532536
"string",

specification.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ workflow execution. They can be referenced by states [action definitions](#Actio
10591059
define when the service operations should be invoked during workflow execution, as well as the data parameters
10601060
passed to them if needed.
10611061

1062-
Note that with Serverless Workflow, we can also define service invocations via events.
1062+
Note that with Serverless Workflow, we can also define invocation of services which are triggered via an event.
10631063
To learn more about that, please reference the [event definitions](#Event-Definition) section,
10641064
as well as the [actions definitions](#Action-Definition) [eventRef](#EventRef-Definition) property.
10651065

@@ -3771,7 +3771,7 @@ Service invocation can be done in two different ways:
37713771
* Reference a sub-workflow invocation via the `subFlowRef` property.
37723772

37733773
In the event-based scenario a service, or a set of services we want to invoke
3774-
are not exposed via a specific resource URI for example, but can only be invoked via events.
3774+
are not exposed via a specific resource URI for example, but can only be invoked via an event.
37753775
The [eventRef](#EventRef-Definition) property defines the
37763776
referenced `produced` event via its `triggerEventRef` property and a `consumed` event via its `resultEventRef` property.
37773777

@@ -3890,6 +3890,7 @@ Here is an example of using the `arguments` property:
38903890
| --- | --- | --- | --- |
38913891
| [triggerEventRef](#Event-Definition) | Reference to the unique name of a `produced` event definition | string | yes |
38923892
| [resultEventRef](#Event-Definition) | Reference to the unique name of a `consumed` event definition | string | yes |
3893+
| resultEventTimeout | Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it be set to the [actionExecutionTimeout](#Workflow-Timeout-Definition) | string | no |
38933894
| data | If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by `triggerEventRef`. If object type, a custom object to become the data (payload) of the event referenced by `triggerEventRef`. | string or object | no |
38943895
| contextAttributes | Add additional event extension context attributes to the trigger/produced event | object | no |
38953896

@@ -3938,6 +3939,10 @@ to be used as payload of the event referenced by `triggerEventRef`. If it is of
39383939
The `contextAttributes` property allows you to add one or more [extension context attributes](https://github.com/cloudevents/spec/blob/master/spec.md#extension-context-attributes)
39393940
to the trigger/produced event.
39403941

3942+
The `resultEventTimeout` 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).
3943+
If the event defined by the `resultEventRef` property is not received in that set time, action invocation should raise an error
3944+
that can be handled in the states `onErrors` definition.
3945+
39413946
##### SubFlowRef Definition
39423947

39433948
`SubFlowRef` definition can have two types, namely `string` or `object`.
@@ -5374,7 +5379,7 @@ If `object` type, it is used to define the timeout definitions in-line and has t
53745379
| --- | --- | --- | --- |
53755380
| workflowExecTimeout | Workflow execution timeout (ISO 8601 duration format) | string or object | no |
53765381
| stateExecTimeout | Default workflow state execution timeout (ISO 8601 duration format) | string or object | no |
5377-
| actionExecTimeouts | Default single actions definition execution timeout (ISO 8601 duration format) | string | no |
5382+
| actionExecTimeout | Default single actions definition execution timeout (ISO 8601 duration format) | string | no |
53785383
| branchExecTimeout | Default single branch execution timeout (ISO 8601 duration format) | string | no |
53795384
| eventTimeout | Default timeout for consuming defined events (ISO 8601 duration format) | string | no |
53805385

0 commit comments

Comments
 (0)