serverlessworkflow / sdk-typescript

Typescript SDK for Serverless Workflow
https://serverlessworkflow.io/
Apache License 2.0
64 stars 16 forks source link

Diagram generation fails when switch state condition has an end definition #140

Closed tsurdilo closed 3 years ago

tsurdilo commented 3 years ago

If you have a switch state and inside the condition you have "transition", works fine, but when inside you have "end" definition (boolean or object type) then diagram generation fails: instead of linking to end definition it creates an "undefined" state.

To reproduce just use any switch state sample and in one of the conditions instead of transition put

"end": true

here is example:

Screen Shot 2021-10-23 at 9 10 49 PM
antmendoza commented 3 years ago

thank you @tsurdilo ,

in fact, there was a //TODO 🙄

here the PR https://github.com/serverlessworkflow/sdk-typescript/pull/141/

tsurdilo commented 3 years ago

thanks!!!

tsurdilo commented 3 years ago

@antmendoza thanks for the quick fix! was replacing all the images in samples md to use your mermaid ones and that came up :)