Skip to content

Commit 34c3203

Browse files
authored
Merge pull request #661 from tomasdavidorg/end-transition-unif
Unify end and transition parameters
2 parents 8ba2ee0 + 084571b commit 34c3203

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

specification.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,9 +2134,9 @@ Serverless Workflow defines the following Workflow States:
21342134
| [onEvents](#OnEvents-Definition) | Define the events to be consumed and optional actions to be performed | array | yes |
21352135
| [timeouts](#Workflow-Timeouts) | State specific timeout settings | object | no |
21362136
| [stateDataFilter](#State-data-filters) | State data filter definition| object | no |
2137-
| [transition](#Transitions) | Next transition of the workflow after all the actions have been performed | object | yes if "end" is not defined |
2137+
| [transition](#Transitions) | Next transition of the workflow after all the actions have been performed | string or object | yes (if `end` is not defined) |
21382138
| [onErrors](#Error-Definition) | States error handling definitions | array | no |
2139-
| [end](#End-Definition) | Is this state an end state | object | yes, if "transition" is not defined |
2139+
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
21402140
| [compensatedBy](#Workflow-Compensation) | Unique name of a workflow state which is responsible for compensation of this state | string | no |
21412141
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
21422142

@@ -2283,11 +2283,11 @@ Note that `transition` and `end` properties are mutually exclusive, meaning that
22832283
| [timeouts](#Workflow-Timeouts) | State specific timeout settings | object | no |
22842284
| [stateDataFilter](#State-data-filters) | State data filter | object | no |
22852285
| [onErrors](#Error-Definition) | States error handling and retries definitions | array | no |
2286-
| [transition](#Transitions) | Next transition of the workflow after all the actions have been performed | object | yes (if end is not defined) |
2286+
| [transition](#Transitions) | Next transition of the workflow after all the actions have been performed | string or object | yes (if `end` is not defined) |
22872287
| [compensatedBy](#Workflow-Compensation) | Unique name of a workflow state which is responsible for compensation of this state | string | no |
22882288
| [usedForCompensation](#Workflow-Compensation) | If true, this state is used to compensate another state. Default is "false" | boolean | no |
22892289
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
2290-
| [end](#End-Definition) | Is this state an end state | object | no |
2290+
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
22912291

22922292
<details><summary><strong>Click to view example definition</strong></summary>
22932293
<p>
@@ -2452,8 +2452,8 @@ The `timeouts` property can be used to define state specific timeout settings. S
24522452
| name | Unique State name | string | yes |
24532453
| type | State type | string | yes |
24542454
| 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 |
2455-
| [transition](#Transitions) | Next transition of the workflow after the sleep | object | yes (if end is not defined) |
2456-
| [end](#End-Definition) |If this state an end state | object | no |
2455+
| [transition](#Transitions) | Next transition of the workflow after the sleep | string or object | yes (if `end` is not defined) |
2456+
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
24572457

24582458
<details><summary><strong>Click to view example definition</strong></summary>
24592459
<p>
@@ -2508,11 +2508,11 @@ Note that `transition` and `end` properties are mutually exclusive, meaning that
25082508
| [timeouts](#Workflow-Timeouts) | State specific timeout settings | object | no |
25092509
| [stateDataFilter](#State-data-filters) | State data filter | object | no |
25102510
| [onErrors](#Error-Definition) | States error handling and retries definitions | array | no |
2511-
| [transition](#Transitions) | Next transition of the workflow after all branches have completed execution | object | yes if "end" is not defined |
2511+
| [transition](#Transitions) | Next transition of the workflow after all branches have completed execution | string or object | yes (if `end` is not defined) |
25122512
| [compensatedBy](#Workflow-Compensation) | Unique name of a workflow state which is responsible for compensation of this state | string | no |
25132513
| [usedForCompensation](#Workflow-Compensation) | If true, this state is used to compensate another state. Default is "false" | boolean | no |
25142514
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
2515-
| [end](#End-Definition) | If this state and end state | object | yes if "transition" is not defined |
2515+
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
25162516

25172517
<details><summary><strong>Click to view example definition</strong></summary>
25182518
<p>
@@ -2618,11 +2618,11 @@ Note that `transition` and `end` properties are mutually exclusive, meaning that
26182618
| type | State type | string | yes |
26192619
| data | JSON object which can be set as state's data input and can be manipulated via filter | object | yes |
26202620
| [stateDataFilter](#state-data-filters) | State data filter | object | no |
2621-
| [transition](#Transitions) | Next transition of the workflow after injection has completed | object | yes if "end" is set to false |
2621+
| [transition](#Transitions) | Next transition of the workflow after injection has completed | string or object | yes (if `end` is not defined) |
26222622
| [compensatedBy](#Workflow-Compensation) | Unique name of a workflow state which is responsible for compensation of this state | string | no |
26232623
| [usedForCompensation](#Workflow-Compensation) | If true, this state is used to compensate another state. Default is "false" | boolean | no |
26242624
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
2625-
| [end](#End-Definition) | If this state and end state | object | yes if "transition" is not defined |
2625+
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
26262626

26272627
<details><summary><strong>Click to view example definition</strong></summary>
26282628
<p>
@@ -2855,11 +2855,11 @@ Note that `transition` and `end` properties are mutually exclusive, meaning that
28552855
| [timeouts](#Workflow-Timeouts) | State specific timeout settings | object | no |
28562856
| [stateDataFilter](#State-data-filters) | State data filter definition | object | no |
28572857
| [onErrors](#Error-Definition) | States error handling and retries definitions | array | no |
2858-
| [transition](#Transitions) | Next transition of the workflow after state has completed | object | yes if "end" is not defined |
2858+
| [transition](#Transitions) | Next transition of the workflow after state has completed | string or object | yes (if `end` is not defined) |
28592859
| [compensatedBy](#Workflow-Compensation) | Unique name of a workflow state which is responsible for compensation of this state | string | no |
28602860
| [usedForCompensation](#Workflow-Compensation) | If true, this state is used to compensate another state. Default is "false" | boolean | no |
28612861
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
2862-
| [end](#End-Definition) | Is this state an end state | object | yes if "transition" is not defined |
2862+
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
28632863

28642864
<details><summary><strong>Click to view example definition</strong></summary>
28652865
<p>
@@ -3095,8 +3095,8 @@ Note that `transition` and `end` properties are mutually exclusive, meaning that
30953095
| [eventDataFilter](#Event-data-filters) | Callback event data filter definition | object | no |
30963096
| [stateDataFilter](#State-data-filters) | State data filter definition | object | no |
30973097
| [onErrors](#Error-Definition) | States error handling and retries definitions | array | no |
3098-
| [transition](#Transitions) | Next transition of the workflow after callback event has been received | object | yes if "end" is not defined |
3099-
| [end](#End-Definition) | Is this state an end state | object | yes if "transition" is not defined |
3098+
| [transition](#Transitions) | Next transition of the workflow after callback event has been received | string or object | yes (if `end` is not defined) |
3099+
| [end](#End-Definition) | Is this state an end state | boolean or object | yes (if `transition` is not defined) |
31003100
| [compensatedBy](#Workflow-Compensation) | Uniaue name of a workflow state which is responsible for compensation of this state | string | no |
31013101
| [usedForCompensation](#Workflow-Compensation) | If true, this state is used to compensate another state. Default is "false" | boolean | no |
31023102
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
@@ -4093,7 +4093,8 @@ If it is set to `continue`, if the parent workflow completes, the subflow execut
40934093
| Parameter | Description | Type | Required |
40944094
| --- | --- | --- | --- |
40954095
| errorRef or errorRefs | Reference one unique workflow error definition, or multiple unique workflow error definitions | string (errorRef) or array (errorRefs) | yes |
4096-
| [transition](#Transitions) or [end](#End-Definition) | Transition to next state to handle the error, or end workflow execution if this error is encountered | object | yes |
4096+
| [transition](#Transitions) | Transition to next state to handle the error | string or object | yes (if `end` is not defined) |
4097+
| [end](#End-Definition) | End workflow execution if this error is encountered | boolean or object | yes (if `transition` is not defined) |
40974098

40984099
<details><summary><strong>Click to view example definition</strong></summary>
40994100
<p>
@@ -4351,7 +4352,8 @@ Transitions allow you to move from one state (control-logic block) to another. F
43514352
| --- | --- | --- | --- |
43524353
| name | Data condition name | string | no |
43534354
| [condition](#Workflow-Expressions) | Workflow expression evaluated against state data. Must evaluate to true or false | string | yes |
4354-
| [transition](#Transitions) or [end](#End-Definition) | Defines what to do if condition is true. Transition to another state, or end workflow | object | yes |
4355+
| [transition](#Transitions) | Transition to another state if condition is true | string or object | yes (if `end` is not defined) |
4356+
| [end](#End-Definition) | End workflow execution if condition is true | boolean or object | yes (if `transition` is not defined) |
43554357
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
43564358

43574359
<details><summary><strong>Click to view example definition</strong></summary>
@@ -4403,7 +4405,8 @@ definitions are mutually exclusive, meaning that you can specify either one or t
44034405
| --- | --- | --- | --- |
44044406
| name | Event condition name | string | no |
44054407
| eventRef | References an unique event name in the defined workflow events | string | yes |
4406-
| [transition](#Transitions) or [end](#End-Definition) | Defines what to do if condition is true. Transition to another state, or end workflow | object | yes |
4408+
| [transition](#Transitions) | Transition to another state if condition is true | string or object | yes (if `end` is not defined) |
4409+
| [end](#End-Definition) | End workflow execution if condition is true | boolean or object | yes (if `transition` is not defined) |
44074410
| [eventDataFilter](#Event-data-filters) | Event data filter definition | object | no |
44084411
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
44094412

0 commit comments

Comments
 (0)