Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions schema/workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,7 @@
"required": [
"name",
"type",
"eventConditions",
"default"
"eventConditions"
]
},
"databasedswitch": {
Expand Down Expand Up @@ -944,8 +943,7 @@
"required": [
"name",
"type",
"dataConditions",
"default"
"dataConditions"
]
},
"defaultdef": {
Expand Down Expand Up @@ -1037,7 +1035,7 @@
},
"required": [
"eventRef",
"transition"
"end"
]
},
"datacondition": {
Expand Down
2 changes: 1 addition & 1 deletion specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ Once all actions have been performed, a transition to another state can occur.
| [stateDataFilter](#state-data-filter) | State data filter | object | no |
| [onErrors](#Error-Definition) | States error handling and retries definitions | array | no |
| eventTimeout | If eventConditions is used, defines the time period to wait for events (ISO 8601 format). For example: "PT15M" (15 minutes), or "P2DT3H4M" (2 days, 3 hours and 4 minutes)| string | yes only if eventConditions is defined |
| default | Default transition of the workflow if there is no matching data conditions or event timeout is reached. Can be a transition or end definition | object | yes |
| default | Default transition of the workflow if there is no matching data conditions or event timeout is reached. Can be a transition or end definition | object | no |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imho, if default is not provided, then we should treat it like the user specified an 'end' definition, and that the doc should be updated here to clearly call that out. On the call, the alternative idea was to say that a runtime exception should be thrown, imho these are functionally the same but 'end' seems less surprising.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho exception is better as modellers can catch it during testing. typically not being able to transition as wanted from a switch state is a really bad thing and masking it with an "end" (workflow termination) might be very confusing imo. wdyt?

| [compensatedBy](#Workflow-Compensation) | Unique name of a workflow state which is responsible for compensation of this state | String | no |
| [usedForCompensation](#Workflow-Compensation) | If true, this state is used to compensate another state. Default is "false" | boolean | no |
| [metadata](#Workflow-Metadata) | Metadata information| object | no |
Expand Down