Skip to content

Commit 808d72b

Browse files
Merge branch 'main' into string-substitution
2 parents 43c3d15 + 7fcc3ca commit 808d72b

File tree

2 files changed

+38
-15
lines changed

2 files changed

+38
-15
lines changed

dsl-reference.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ Defines the [Problem Details RFC](https://datatracker.ietf.org/doc/html/rfc7807)
13551355
#### Examples
13561356

13571357
```yaml
1358-
type: https://https://serverlessworkflow.io/spec/1.0.0/errors/communication
1358+
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
13591359
title: Service Not Available
13601360
status: 503
13611361
```
@@ -1366,14 +1366,14 @@ Standard error types serve the purpose of categorizing errors consistently acros
13661366

13671367
| Type | Status¹ | Description |
13681368
|------|:-------:|-------------|
1369-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/configuration](#) | `400` | Errors resulting from incorrect or invalid configuration settings, such as missing or misconfigured environment variables, incorrect parameter values, or configuration file errors. |
1370-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/validation](#) | `400` | Errors arising from validation processes, such as validation of input data, schema validation failures, or validation constraints not being met. These errors indicate that the provided data or configuration does not adhere to the expected format or requirements specified by the workflow. |
1371-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/expression](#) | `400` | Errors occurring during the evaluation of runtime expressions, such as invalid syntax or unsupported operations. |
1372-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/authentication](#) | `401` | Errors related to authentication failures. |
1373-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/authorization](#) | `403` | Errors related to unauthorized access attempts or insufficient permissions to perform certain actions within the workflow. |
1374-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/timeout](#) | `408` | Errors caused by timeouts during the execution of tasks or during interactions with external services. |
1375-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/communication](#) | `500` | Errors encountered while communicating with external services, including network errors, service unavailable, or invalid responses. |
1376-
| [https://https://serverlessworkflow.io/spec/1.0.0/errors/runtime](#) | `500` | Errors occurring during the runtime execution of a workflow, including unexpected exceptions, errors related to resource allocation, or failures in handling workflow tasks. These errors typically occur during the actual execution of workflow components and may require runtime-specific handling and resolution strategies. |
1369+
| [https://serverlessworkflow.io/spec/1.0.0/errors/configuration](#) | `400` | Errors resulting from incorrect or invalid configuration settings, such as missing or misconfigured environment variables, incorrect parameter values, or configuration file errors. |
1370+
| [https://serverlessworkflow.io/spec/1.0.0/errors/validation](#) | `400` | Errors arising from validation processes, such as validation of input data, schema validation failures, or validation constraints not being met. These errors indicate that the provided data or configuration does not adhere to the expected format or requirements specified by the workflow. |
1371+
| [https://serverlessworkflow.io/spec/1.0.0/errors/expression](#) | `400` | Errors occurring during the evaluation of runtime expressions, such as invalid syntax or unsupported operations. |
1372+
| [https://serverlessworkflow.io/spec/1.0.0/errors/authentication](#) | `401` | Errors related to authentication failures. |
1373+
| [https://serverlessworkflow.io/spec/1.0.0/errors/authorization](#) | `403` | Errors related to unauthorized access attempts or insufficient permissions to perform certain actions within the workflow. |
1374+
| [https://serverlessworkflow.io/spec/1.0.0/errors/timeout](#) | `408` | Errors caused by timeouts during the execution of tasks or during interactions with external services. |
1375+
| [https://serverlessworkflow.io/spec/1.0.0/errors/communication](#) | `500` | Errors encountered while communicating with external services, including network errors, service unavailable, or invalid responses. |
1376+
| [https://serverlessworkflow.io/spec/1.0.0/errors/runtime](#) | `500` | Errors occurring during the runtime execution of a workflow, including unexpected exceptions, errors related to resource allocation, or failures in handling workflow tasks. These errors typically occur during the actual execution of workflow components and may require runtime-specific handling and resolution strategies. |
13771377

13781378
¹ *Default value. The `status code` that best describe the error should always be used.*
13791379

dsl.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,40 @@ Runtimes **may** optionally support other runtime expression languages, which au
196196

197197
CloudFlows defines [several arguments](#runtime-expression-arguments) that runtimes **must** provide during the evaluation of runtime expressions.
198198

199-
When the evaluation of an expression fails, runtimes **must** raise an error with type `https://https://serverlessworkflow.io/spec/1.0.0/errors/expression` and status `400`.
199+
When the evaluation of an expression fails, runtimes **must** raise an error with type `https://serverlessworkflow.io/spec/1.0.0/errors/expression` and status `400`.
200200

201201
#### Runtime expression arguments
202202

203203
| Name | Type | Description |
204204
|:-----|:----:|:------------|
205-
| context | `map` | The task's context data. |
205+
| context | `any` | The task's context data. |
206206
| input | `any` | The task's filtered input. |
207207
| secrets | `map` | A key/value map of the workflow secrets.<br>To avoid unintentional bleeding, secrets can only be used in the `input.from` runtime expression. |
208208
| task | [`taskDescriptor`](#task-descriptor) | Describes the current task. |
209-
| workflow | [`workflowDescritor`](#workflow-descriptor) | Describes the current workflow. |
209+
| workflow | [`workflowDescriptor`](#workflow-descriptor) | Describes the current workflow. |
210+
211+
##### Task Descriptor
212+
213+
| Name | Type | Description | Example |
214+
|:-----|:----:|:------------|:--------|
215+
| name | `string` | The task's name. | `getPet` |
216+
| definition | `map` | The tasks definition (specified under the name) as a parsed object | `{ "call": "http", "with": { ... } }` |
217+
| input | `any` | The task's input *BEFORE* the `input.from` expression. For the result of `input.from` expression use the context of the runtime expression (for jq `.`) | - |
218+
| startedAt.iso8601 | `string` | The start time of the task as a ISO 8601 date time string. It uses `T` as the date-time delimiter, either UTC (`Z`) or a time zone offset (`+01:00`). The precision can be either seconds, milliseconds or nanoseconds | `2022-01-01T12:00:00Z`, `2022-01-01T12:00:00.123456Z`, `2022-01-01T12:00:00.123+01:00` |
219+
| startedAt.epochMillis | `integer` | The start time of the task as a integer value of milliseconds since midnight of 1970-01-01 UTC | `1641024000123` (="2022-01-01T08:00:00.123Z") |
220+
| startedAt.epochNanos | `integer` | The start time of the task as a integer value of nanoseconds since midnight of 1970-01-01 UTC | `1641024000123456` (="2022-01-01T08:00:00.123456Z") |
221+
222+
##### Workflow Descriptor
223+
224+
225+
| Name | Type | Description | Example |
226+
|:-----|:----:|:------------|:--------|
227+
| id | `string` | A unique id of the workflow execution. Now specific format is imposed | UUIDv4: `4a5c8422-5868-4e12-8dd9-220810d2b9ee`, ULID: `0000004JFGDSW1H037G7J7SFB9` |
228+
| definition | `map` | The workflow's definition as a parsed object | `{ "document": { ... }, "do": [...] }` |
229+
| input | `any` | The workflow's input *BEFORE* the `input.from` expression. For the result of `input.from` expression use the `$input` argument | - |
230+
| startedAt.iso8601 | `string` | The start time of the execution as a ISO 8601 date time string. It uses `T` as the date-time delimiter, either UTC (`Z`) or a time zone offset (`+01:00`). The precision can be either seconds, milliseconds or nanoseconds | `2022-01-01T12:00:00Z`, `2022-01-01T12:00:00.123456Z`, `2022-01-01T12:00:00.123+01:00` |
231+
| startedAt.epochMillis | `integer` | The start time of the execution as a integer value of milliseconds since midnight of 1970-01-01 UTC | `1641024000123` (="2022-01-01T08:00:00.123Z") |
232+
| startedAt.epochNanos | `integer` | The start time of the execution as a integer value of nanoseconds since midnight of 1970-01-01 UTC | `1641024000123456` (="2022-01-01T08:00:00.123456Z") |
210233

211234
### Fault Tolerance
212235

@@ -220,7 +243,7 @@ Errors in Serverless Workflow are described using the [Problem Details RFC](http
220243

221244
*Example error:*
222245
```yaml
223-
type: https://https://serverlessworkflow.io/spec/1.0.0/errors/communication
246+
type: https://serverlessworkflow.io/spec/1.0.0/errors/communication
224247
title: Service Unavailable
225248
status: 503
226249
detail: The service is currently unavailable. Please try again later.
@@ -263,7 +286,7 @@ Workflows and tasks alike can be configured to timeout after a defined amount of
263286

264287
When a timeout occur, runtimes **must** abruptly interrupt the execution of the workflow/task, and **must** raise an error that, if uncaught, force the workflow/task to transition to the [`faulted` status phase](#status-phases).
265288

266-
A timeout error **must** have its `type` set to `https://https://serverlessworkflow.io/spec/1.0.0/errors/timeout` and **should** have its `status` set to `408`.
289+
A timeout error **must** have its `type` set to `https://serverlessworkflow.io/spec/1.0.0/errors/timeout` and **should** have its `status` set to `408`.
267290

268291
### Interoperability
269292

@@ -275,7 +298,7 @@ Serverless Workflow DSL is designed to seamlessly interact with a variety of ser
275298
- [**AsyncAPI**](dsl-reference.md#asyncapi-call): Facilitates interaction with asynchronous messaging protocols. AsyncAPI is designed for event-driven architectures, allowing workflows to publish and subscribe to events.
276299
- [**OpenAPI**](dsl-reference.md#openapi-call): Enables communication with services that provide OpenAPI specifications, which is useful for defining and consuming RESTful APIs.
277300

278-
Runtimes **must** raise an error with type `https://https://serverlessworkflow.io/spec/1.0.0/errors/communication` if and when a problem occurs during a call.
301+
Runtimes **must** raise an error with type `https://serverlessworkflow.io/spec/1.0.0/errors/communication` if and when a problem occurs during a call.
279302

280303
#### Custom and Non-Standard Interactions
281304

0 commit comments

Comments
 (0)