Skip to content

Commit 0ceb0e3

Browse files
nyamathshaikricardozaninitoxikgeomagillesmbroz2
authored
Update Set task to support direct runtime expression (#1086)
* Fix #1076 - Make detail and title a runtime expression in the schema Signed-off-by: Ricardo Zanini <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * Add string as anyOf Signed-off-by: Ricardo Zanini <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * feat(schema): allow expressions in HTTP query and headers (#1080) Issue #1079 Signed-off-by: Alexandru Georoceanu <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * update DSL version from alpha1, alpha2, alpha5 to 1.0.0 across multip… (#1082) * update DSL version from alpha1, alpha2, alpha5 to 1.0.0 across multiple YAML files Signed-off-by: Gilles Barbier <[email protected]> * fix(contributing): reverting pre-release versioning format Signed-off-by: Gilles Barbier <[email protected]> --------- Signed-off-by: Gilles Barbier <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * Fix the description of flow directives and addressed few issues in dsl and dsl-reference (#1083) * update DSL version from alpha1, alpha2, alpha5 to 1.0.0 across multip… (#1082) * update DSL version from alpha1, alpha2, alpha5 to 1.0.0 across multiple YAML files Signed-off-by: Gilles Barbier <[email protected]> * fix(contributing): reverting pre-release versioning format Signed-off-by: Gilles Barbier <[email protected]> --------- Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl): fix a few issues in dsl and dsl-reference Signed-off-by: Gilles Barbier <[email protected]> * update .gitignore to include .DS_Store Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): correct table formatting Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): clarify flow directive descriptions Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): improve table formatting Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): clarify flow directive descriptions Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl): fix a few issues in dsl and dsl-reference Signed-off-by: Gilles Barbier <[email protected]> * update .gitignore to include .DS_Store Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): correct table formatting Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): clarify flow directive descriptions Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): improve table formatting Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): clarify flow directive descriptions Signed-off-by: Gilles Barbier <[email protected]> * fix(dsl-reference): improve table formatting Signed-off-by: Gilles Barbier <[email protected]> * remove again .DS_Store Signed-off-by: Gilles Barbier <[email protected]> --------- Signed-off-by: Gilles Barbier <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * Fix broken link in README.md (#1084) Signed-off-by: Michal Broz <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * Set task to support direct runtime expression Signed-off-by: Nyamath Shaik <[email protected]> * updated workflow schema along with table fix Signed-off-by: Nyamath Shaik <[email protected]> * updating the schema Signed-off-by: Nyamath Shaik <[email protected]> * addressing PR comment reviews Signed-off-by: Nyamath Shaik <[email protected]> * removing unwanted set example Signed-off-by: Nyamath Shaik <[email protected]> * Update dsl-reference.md Co-authored-by: Charles d'Avernas <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * Update dsl-reference.md Co-authored-by: Charles d'Avernas <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * Update dsl-reference.md Co-authored-by: Charles d'Avernas <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * reverting back original set example change Signed-off-by: Nyamath Shaik <[email protected]> * Update dsl-reference.md Co-authored-by: Charles d'Avernas <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * passing the set example as object Signed-off-by: Nyamath Shaik <[email protected]> * reverting to original Signed-off-by: Nyamath Shaik <[email protected]> * Add a new file that compares the Serverless Workflow to other popular DSLs Signed-off-by: Charles d'Avernas <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> * Fix a the `catalog` link in the `use` section table (#1088) Signed-off-by: Charles d'Avernas <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> --------- Signed-off-by: Ricardo Zanini <[email protected]> Signed-off-by: Nyamath Shaik <[email protected]> Signed-off-by: Alexandru Georoceanu <[email protected]> Signed-off-by: Gilles Barbier <[email protected]> Signed-off-by: Michal Broz <[email protected]> Signed-off-by: Charles d'Avernas <[email protected]> Co-authored-by: Ricardo Zanini <[email protected]> Co-authored-by: Alexandru Georoceanu <[email protected]> Co-authored-by: Gilles Barbier <[email protected]> Co-authored-by: mbroz2 <[email protected]> Co-authored-by: Charles d'Avernas <[email protected]>
1 parent 5263808 commit 0ceb0e3

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

Diff for: dsl-reference.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,8 @@ A task used to set data.
962962
##### Properties
963963

964964
| Name | Type | Required | Description |
965-
|:--|:---:|:---:|:---|
966-
| set | `object` | `yes` | A name/value mapping of the data to set. |
965+
|:-------|:------:|:----------:|:-------------|
966+
| set | `map` <br> `string` | `yes` | The data to set.<br>*Can be an object or a direct runtime expression.* |
967967

968968
##### Examples
969969

@@ -979,6 +979,8 @@ do:
979979
shape: circle
980980
size: ${ .configuration.size }
981981
fill: ${ .configuration.fill }
982+
- setColor:
983+
set: ${ .configuration.color }
982984
```
983985

984986
#### Switch

Diff for: examples/set-expression.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
document:
2+
dsl: '1.0.0'
3+
namespace: test
4+
name: set
5+
version: '0.1.0'
6+
schedule:
7+
on:
8+
one:
9+
with:
10+
type: io.serverlessworkflow.samples.events.trigger.v1
11+
do:
12+
- initialize:
13+
set: ${ $workflow.input[0] }

Diff for: examples/set.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schedule:
88
one:
99
with:
1010
type: io.serverlessworkflow.samples.events.trigger.v1
11-
do:
11+
do:
1212
- initialize:
1313
set:
1414
startEvent: ${ $workflow.input[0] }

Diff for: schema/workflow.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -767,11 +767,13 @@ $defs:
767767
unevaluatedProperties: false
768768
properties:
769769
set:
770-
type: object
770+
oneOf:
771+
- type: object
772+
minProperties: 1
773+
additionalProperties: true
774+
- type: string
771775
title: SetTaskConfiguration
772776
description: The data to set.
773-
minProperties: 1
774-
additionalProperties: true
775777
switchTask:
776778
type: object
777779
$ref: '#/$defs/taskBase'

0 commit comments

Comments
 (0)