Skip to content

Commit de73227

Browse files
authored
Merge pull request serverlessworkflow#965 from neuroglia-io/feat-task-descriptor-reference
Add `reference` property to the `TaskDescriptor` object
2 parents a2a2b87 + d13aaff commit de73227

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

dsl.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -296,18 +296,6 @@ This argument contains information about the runtime executing the workflow.
296296
| version | `string` | The version of the runtime. This can be an arbitrary string | a incrementing positive integer (`362`), semantic version (`1.4.78`), commit hash (`04cd3be6da98fc35422c8caa821e0aa1ef6b2c02`) or container image label (`v0.7.43-alpine`) |
297297
| metadata | `map` | An object/map of implementation specific key-value pairs. This can be chosen by runtime implementors and usage of this argument signals that a given workflow definition might not be runtime agnostic | A Software as a Service (SaaS) provider might choose to expose information about the tenant the workflow is executed for e.g. `{ "organization": { "id": "org-ff51cff2-fc83-4d70-9af1-8dacdbbce0be", "name": "example-corp" }, "featureFlags": ["fastZip", "arm64"] }`. |
298298

299-
##### Task Descriptor
300-
301-
| Name | Type | Description | Example |
302-
|:-----|:----:|:------------|:--------|
303-
| name | `string` | The task's name. | `getPet` |
304-
| definition | `map` | The tasks definition (specified under the name) as a parsed object | `{ "call": "http", "with": { ... } }` |
305-
| input | `any` | The task's *raw* input (i.e. *BEFORE* the `input.from` expression). For the result of `input.from` expression use the context of the runtime expression (for jq `.`) | - |
306-
| output | `any` | The task's *raw* output (i.e. *BEFORE* the `output.as` expression). | - |
307-
| 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` |
308-
| 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") |
309-
| 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") |
310-
311299
##### Workflow Descriptor
312300

313301
| Name | Type | Description | Example |
@@ -331,6 +319,19 @@ The following table shows which arguments are available for each runtime express
331319
| Task `export.as` | Transformed task output | `$context` |||||||
332320
| Workflow `output.as` | Last task's transformed output | Transformed workflow output || | || ||
333321

322+
##### Task Descriptor
323+
324+
| Name | Type | Description | Example |
325+
|:-----|:----:|:------------|:--------|
326+
| name | `string` | The task's name. | `getPet` |
327+
| reference | `string` | The task's reference. | `/do/2/myTask` |
328+
| definition | `map` | The tasks definition (specified under the name) as a parsed object | `{ "call": "http", "with": { ... } }` |
329+
| input | `any` | The task's *raw* input (i.e. *BEFORE* the `input.from` expression). For the result of `input.from` expression use the context of the runtime expression (for jq `.`) | - |
330+
| output | `any` | The task's *raw* output (i.e. *BEFORE* the `output.as` expression). | - |
331+
| 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` |
332+
| 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") |
333+
| 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") |
334+
334335
### Fault Tolerance
335336

336337
Serverless Workflow is designed with resilience in mind, acknowledging that errors are an inevitable part of any system. The DSL provides robust mechanisms to identify, describe, and handle errors effectively, ensuring the workflow can recover gracefully from failures.

0 commit comments

Comments
 (0)