Skip to content

Error title and detail in workflow.yaml schema should be a Runtime Expression and not a String #1076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ricardozanini opened this issue Feb 5, 2025 · 0 comments · Fixed by #1077
Assignees
Labels
area: spec Changes in the Specification change: fix Something isn't working. Impacts in a minor version change. type: bug
Milestone

Comments

@ricardozanini
Copy link
Member

I tried this:

The current title and detail in the Error definition are strings. Still, they should be runtime expressions so users can manipulate the error structure when raising an error, for example.

This happened:

The schema is not enforcing what we have in examples:

document:
  dsl: '1.0.0-alpha5'
  namespace: test
  name: raise-not-implemented
  version: '0.1.0'
do: 
  - notImplemented:
      raise:
        error:
          type: https://serverlessworkflow.io/errors/not-implemented
          status: 500
          title: Not Implemented
          detail: ${ "The workflow '\( $workflow.definition.document.name ):\( $workflow.definition.document.version )' is a work in progress and cannot be run yet" }

https://github.com/serverlessworkflow/specification/blob/v1.0.0/examples/raise-inline.yaml

I expected this:

No response

Is there a workaround?

No response

Anything else?

See reference:
https://github.com/serverlessworkflow/specification/blob/v1.0.0/schema/workflow.yaml#L1190-L1197

Area(s)

Schema

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞
@ricardozanini ricardozanini self-assigned this Feb 5, 2025
@ricardozanini ricardozanini added change: fix Something isn't working. Impacts in a minor version change. area: spec Changes in the Specification labels Feb 5, 2025
@ricardozanini ricardozanini added this to the v1.1.0 milestone Feb 5, 2025
cdavernas added a commit that referenced this issue Feb 5, 2025
Fix #1076 - Make detail and title a runtime expression in the schema
@github-project-automation github-project-automation bot moved this from Backlog to Done in Progress Tracker Feb 5, 2025
nyamathshaik pushed a commit to nyamathshaik/specification that referenced this issue Mar 19, 2025
…ion in the schema

Signed-off-by: Ricardo Zanini <[email protected]>
Signed-off-by: Nyamath Shaik <[email protected]>
ricardozanini added a commit that referenced this issue Mar 19, 2025
* 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]>
fjtirado added a commit to serverlessworkflow/sdk-java that referenced this issue Apr 29, 2025
fjtirado added a commit to serverlessworkflow/sdk-java that referenced this issue Apr 29, 2025
ricardozanini pushed a commit to serverlessworkflow/sdk-java that referenced this issue Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: spec Changes in the Specification change: fix Something isn't working. Impacts in a minor version change. type: bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant