serverlessworkflow / specification

Contains the official specification for the Serverless Workflow Domain Specific Language. It provides detailed guidelines and standards for defining, executing, and managing workflows in serverless environments, ensuring consistency and interoperability across implementations.
http://serverlessworkflow.io
Apache License 2.0
730 stars 146 forks source link

DSL reference Output example #934

Closed yzhao244 closed 1 month ago

yzhao244 commented 1 month ago

In the DSL reference, I noticed the examples of Output component, I don't think I can define "from" and "to" for Output properties, right. If I am not mistaken lol, I can submit PR to correct this example.

https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#output

schema:
  format: json
  document:
    type: object
    properties:
      petId:
        type: string
    required: [ petId ]
from:                         ## remove from 
  petId: '${ .pet.id }'   ## remove this line
to: '.petList += [ . ]'   ## replace to with as
cdavernas commented 1 month ago

@yzhao244 Great catch! You are totally right!

output.from should actually be output.as and output.to should be export.to.

I'm not sure how the examples could be validated though, as the CI/CD pipeline should have caught those mistakes 😞

matthias-pichler commented 1 month ago

@cdavernas The current schema does specify export.as

cdavernas commented 1 month ago

@matthias-pichler-warrify yes sorry, my bad 😉

yzhao244 commented 1 month ago

@cdavernas @matthias-pichler-warrify Thanks guys for the comments... submitted a PR for updating this example. https://github.com/serverlessworkflow/specification/pull/936

cdavernas commented 1 month ago

Thanks @yzhao244! I will let the pleasure to @ricardozanini to merge it once he could review it. He's gonna be back from PTO in a couple of days 😉