[Spike] Change to BPMN.iO

Created on 8 March 2025, 26 days ago

Problem/Motivation

Steps to reproduce

Proposed resolution

This is a spike to introduce BPMN.iO as the diagraming UI for Migrations, similar to ECA.

Remaining tasks

User interface changes

API changes

Data model changes

โœจ Feature request
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States jcandan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jcandan
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jcandan

    I've provided an orphaned 2.x branch to the [migrate_visualize-3511791](https://git.drupalcode.org/issue/migrate_visualize-3511791) fork.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jcandan

    Here's some composer magic to make it simple to try it out:

      "repositories": [
        {
          "type": "vcs",
          "url": "https://git.drupalcode.org/issue/migrate_visualize-3511791"
        },
        {
          "type": "composer",
          "url": "https://packages.drupal.org/8"
        }
      ],
    

    With the above, you can composer require drupal/migrate_visualize:2.x-dev --no-update && composer update drupal/migrate_visualize --prefer-source.

    Here's my go-to to try things out.

    ddev composer require drupal/migrate_plus
    ddev drush en migrate_visualize migrate_example -y
    

    Log in and hit /admin/structure/migrate/manage/beer/migrations/beer_node/visualization

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cosmicdreams Minneapolis/St. Paul

    Weird I don't appear to have the ability to comment on the diff.

    Are you adding in your own BPMN.io library? I wonder if we'll conflict with ECA if we do. I believe the BPMN bits of ECA is in it's own module. maybe we can depend on it without depending on all of ECA.

    Worth a consideration?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jcandan

    I did try my damndest to use what's there in BPMN.iO โ†’ and/or ECA's modeller_bpmn. I'm sure we can revisit this. But, that's a good question: does it conflict with ECA?

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

    So far I like the idea of providing for BPMN, and I am glad that the existing (1.x) version provides for multiple outputs.

    Even if it doesn't conflict with BPMN, I don't think it's the role of this (developer-targeted) module to depend on ECA. Currently the BPMN.io module depends on ECA (which was odd to see, but it appears the BPMN.io module functionality adds BPMN to ECA). Noting also that there's BPMN.io and bpmn-js. My concern here is that if Migrate Visualize depends on ECA, adding Migrate Visualize as part of migration development and review can have architectural impacts on the site in question.

    I see there is also an existing issue at โœจ Consider replacing GraphViz Active which proposed investigating BPMN. (I'll update the title of that issue so it mentions BPMN!)

    I plan to take a look at whether we can introduce BPMN's JS in a similar manner to how we introduce MermaidJS. I'd use a CDN for this if possible. There's an assumption here that the use of BPMN is similar to MermaidJS and GraphViz, ie that we're visualizing the migration, rather than implementing a visual configuration editor (which would be outside the scope of this module).

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jcandan

    I think thereโ€™s talk of the BPMN.iO module moving to a more generalized approach that we can take advantage of. But I agree with others that work should continue on this module until then.

    Iโ€™ll also take a look at how Mermaid JS was included. Itโ€™s an interesting problem faced by Drupal modules using front-end packages.

    However, I hope the focus of this spike can be on the diagram. I have a hard time visualizing the flow.

    I am thinking a config form first need to establish the source and destination configuration, and THEN we can build the processors in a flow diagram from there.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

    I haven't forgotten about this! I've been making some progress over on ๐Ÿ“Œ Connect pseudofield sources to use in pipeline Active which is adjacent.

    I think if we pull the BPMN JS libraries in directly (as is done for Mermaid currently), we can then output the diagram in BPMN notation, and I don't expect that to take much refactor as we are adding a third output format (GraphViz, Mermaid, BPMN) to an implementation which currently delivers two.

    I expect this would trigger renaming the `migrate_visualize/js` JS to `migrate_visualize/mermaid` and adding a similar JS to initialize BPMN.

    That solves the "what might ECK / BPMN do" issue. If such an integration module for BPMN does appear, we can always switch to that later. For now, CDN inclusion is fine by me; this is a dev module.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jcandan

    FYI, I won't be at DrupalCon Atlanta 2025, but there is a BoF scheduled for the Modeler API on Monday.

    What ECA has demonstrated successfully in combination with bpmn_io should be opened up for other modules like Migrate, AI Agents, or others to also leverage modeler UIs like bpmn_io or others to do similar things without having to have parallel and similar implementations. Can we do that once and for all?

Production build 0.71.5 2024