Skip to content
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

Test BPMN with Deno #168

Open
oberien opened this issue Jun 22, 2021 · 0 comments
Open

Test BPMN with Deno #168

oberien opened this issue Jun 22, 2021 · 0 comments

Comments

@oberien
Copy link
Owner

oberien commented Jun 22, 2021

BPMN is a standard for business process specification. There is a bpmn-js library for creating and rendering the flows, which could be used for integration into heradoc. However, it would be nice if we were able to avoid nodejs as a required system dependency. One possibility could be using deno, a work in progress js / ts runtime based on V8. It is being worked on by the creator of nodejs and written in rust. We should test if it is possible to run bpmn-js with deno without any system dependencies.

Problem 1 - It should run in Deno or at least NodeJS
  • only render implementation I found was bpmn-js
  • only works in browsers
  • uses ES6 directory-imports which aren't supported by nodejs or deno
  • could be fixed by packing its source into a single file (see Problem 2)
  • only cli-tool I could find was bpmn-to-image which internally just launches a headless browser to use bpmn-js in the browser for rendering

Problem 2 - It should be a single file

  • heradoc shouldn't carry around hundreds of small js files which import each other
  • should be packed into a single file instead
  • js packing frameworks are plenty but one more horrific than the other
  • I wasn't able to get a single js file as output with several I tried in less than an hour each
  • why is this so hard?!?!?!

Problem 3 - Should include all dependencies

  • similar to Problem 2 the single js file needs to include all dependencies
  • → we need to use a packer
  • → back to Problem 2…

One idea I haven't tried yet is to use bpmn-js-cli as a basis for packing. Its readme states

Use an ES module aware bundler such as Webpack or Rollup to bundle it for the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant