-
Notifications
You must be signed in to change notification settings - Fork 7
ZMSDiagrams / Mermaid BPMN #126
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
Conversation
|
turbolinks seems to be a blocker; even this solution ZMS/Products/zms/conf/metaobj_manager/zms.diagrams/ZMSDiagram/standard_html.zpt Lines 11 to 19 in 12cfc75
|
|
Now on code-change the mermaid chart will be re-rendered in the ZMI: Hint: the JS code for the re-rendering basically is inspirated by ZMS/Products/zms/conf/metaobj_manager/zms.diagrams/ZMSDiagram/interface_mermaid.zpt Lines 17 to 35 in ac5e068
|
|
added error handling: 0bc023f |
This approach utilizes Mermaid.js for rendering Markdown-inspired text definitions to create and modify diagrams dynamically. https://github.com/mermaid-js/mermaid In addition, the viewer of BPMN.io is used to display BPMN 2.0 (Business Process Model and Notation) and DMN 1.3 (Decision Model and Notation) diagrams in the browser. https://github.com/bpmn-io
avoids any turbo-linking on content obj ZMI if attr turbolinks=false
- based on https://github.com/bpmn-io/bpmn-js-examples/tree/master/url-viewer - jQuery is required - in ZMI preview available by default - in WEB theme this must be ensured
Caveat: Unfortunately the html comment for the javascript block had to be removed to insert the unique e-id using tal blocks for the viewer variable name.
|
|
||
| <tal:block tal:condition="python:is_bpmn and diagram_file"> | ||
| <script tal:attributes="src python:zmscontext.breadcrumbs_obj_path()[0].metaobj_manager.absolute_url()+'/ZMSDiagram.bpmn-viewer.js'"></script> | ||
| <script tal:content="python:'var canvas_id = \'js-canvas_%s\''%(id)"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errror case: multiple canvas elements on a page.
solution: a global var for each canvas id based on it's ZMS id



Find enclosed an initial rough draft to proof the concept of web-based tooling for Diagrams and Charts in ZMS.
See example files for XML-Import and BPMN-Upload.
This approach utilizes Mermaid.js for rendering Markdown-inspired text definitions to create and modify diagrams dynamically.
https://github.com/mermaid-js/mermaid
In addition, the viewer of BPMN.io is used to display BPMN 2.0 (Business Process Model and Notation) and DMN 1.3 (Decision Model and Notation) diagrams in the browser.
https://github.com/bpmn-io
At the moment the ZMI preview rendering lacks due to
Furthermore, the user interface of the ZMSDiagram should be optimized
and/or as in the CodeBlock object
see 012d430#diff-1a2595c39147b3598de6b42daefe290749b94c1db3ac8d82fbfa0e19bc8c5574R47