-
Notifications
You must be signed in to change notification settings - Fork 159
Add stand-alone example resources #324
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
Comments
@neuroglia I was actually working on this hehe :) |
@neuroglia do you think doing this for the comparison examples: https://github.com/serverlessworkflow/specification/tree/main/comparisons would be beneficial as well? |
@tsurdilo Niiiice x) |
@neuroglia we can host all OpenApi defs on serverlessworkflow.io ;) |
@tsurdilo I'm not sure. I must say I only did go once or twice on that specific page, as there was no need to sell me the spec further x) But I can see the added value for more analytical brains than mine I guess! |
@neuroglia if it helps, we do have (i hope all) examples here: https://github.com/serverlessworkflow/sdk-java/tree/main/api/src/test/resources/examples but the problem with that is its a pain to maintain them all the time so they might not be all up to date with the spec examples, but the workflow dsl used there is validated against v0.6. Hope this helps for now until we work on this |
@neuroglia here are some examples the java sdk uses for validation of some certain edge cases: https://github.com/serverlessworkflow/sdk-java/tree/main/api/src/test/resources/features |
@tsurdilo Aaaaah! Awesome! I'll use that to add some unit test before the commit that adds the reader/writer! |
@neuroglia This might help also: https://github.com/serverlessworkflow/sdk-java/blob/main/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java |
@neuroglia one more thing, we have our dsl schemas also exposed on the website: https://serverlessworkflow.io/schemas/latest/workflow.json ..maybe we should expose the examples as well there....hmmm |
@neuroglia |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@cdavernas we talked about this in this weeks meeting. will create a new repo and move all our examples |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Additionally, we use CI to download (cache) and run these tests. MD5 features in GitHub actions work pretty neatly. |
our sdk users should be able to compile sdk and run tests offline as well imo |
@tsurdilo you are totally right! What do you propose we do as of now then? |
was looking at structuring sdks so can take advantage of git submodules maybe. wdyt? |
honestly, the tradeoff of having the examples online vs configuration bottlenecks doesn't seem a bad option IMO. These files can be cached locally by the SDKs as well. At least in Go, we will do a local cache. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This has been addressed in 1.0.0, and is closed as part of #843 In Example: Feature: Flow Directive
As an implementer of the workflow DSL
I want to ensure that tasks are executed in the correct order
So that my implementation conforms to the expected behavior
Scenario: Implicit Sequence Flow
Given a workflow with definition:
"""yaml
document:
dsl: 0.10
namespace: default
name: implicit-sequence
do:
setRed:
set:
colors: '${ .colors + [ "red" ] }'
setGreen:
set:
colors: '${ .colors + [ "green" ] }'
setBlue:
set:
colors: '${ .colors + [ "blue" ] }'
"""
When the workflow is executed
Then the workflow should complete with output:
"""yaml
colors: [ red, green, blue ]
"""
And setRed should run first
And setGreen should run after setRed
And setBlue should run after setGreen |
Uh oh!
There was an error while loading. Please reload this page.
What would you like to be added:
Stand-alone example json/yaml files, instead of just embedding them into an MD file
Why is this needed:
Allows SDKs and other implementations to unit test the successfull parsing of official, up-to-date examples
Other thoughts:
Now, what would be really awesome IMHO is to use factual examples, instead of theoretical ones, so that runtime implementations can test them to. The idea is to create some out-of-the-box examples for which runtime can be validated/tested.
We could use Swagger's Pet Store Api for demonstrating OpenApi function calls, and something like a free webhook tool for testing events.
What do you guys think?
The text was updated successfully, but these errors were encountered: