-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add support for mermaidjs state diagrams #135
Comments
Hi, I have implemented already something and tested with this three examples and this is the output Application request
Provision Orders
Car Vitals Check
In addition to changing the "type" description ("type = Event state" instead of "type = event" and so on..) can you think of any other changes, or any example that I can try in order to test the output ? |
@antmendoza holy crap ty!!!!!!! This is amazing. If you want to try some other samples you can try and compare the ones on Do you think we should make this part of the typescript sdk or is there some way to externalize this into a nodejs app that uses the typescript sdk? Awesome work man |
thank you @tsurdilo
I think that ideally this should be a different project, but on the other hand the implementation is only few files, so I don't know if really makes sense to maintain a different project for now. |
"only few files" for now, let's see if I can make this work and we can decide later. |
i think as long if its somehow possible to use it on our /editor page thats not a nodejs project (just html and js) it does not matter in the end. wdyt? |
i also think we should use mermaidjs output in java sdk too so they are consistent. will look at your impl to copy :) |
what I have implemented here is a class that receives a workflow parameter and generate the mermaid source code. (not the svg)
mermaidjs relies on the browser to render the image, so the actual implementation is enough for the online editor (I have already tested it), but, do we want to expose in our sdk a class called I have been testing the implementation to generate an image directly in the sdk, to make the API more generic, but with this implementation I've realised that the sdk is not working in the browser. to generate the image in the sdk I've had to use a headless browser (or mermaid-cli that at the end is using a headless browser ), and by doing that, for some reason, the final bundle is incompatible with the browser. I need to investigate. So if you think that generating the mermaid source code is enough for now, and we need this for the editor, I can finish the actual implementation and later continue working on this and we will see how we proceed. |
Yeah just the source for now is good. |
What would you like to be added:
Simple support to spit out mermaid state diagram markup. Does not have to be anything fancy.
https://mermaid-js.github.io/mermaid/#/stateDiagram
you can get idea from https://github.com/serverlessworkflow/sdk-java/tree/main/diagram which does similar thing just spits out plantuml markup
Why is this needed:
currently we have support in java sdk for https://plantuml.com/ and it works but requires us to deploy
https://github.com/serverlessworkflow/workflow-diagram-service
on some cloud env, but we can't afford it as a project.
This would allow us to use it in our vscode plugin as well
The text was updated successfully, but these errors were encountered: