Skip to content

BPMN designer contract, per-designer Studio modules and a shared conformance suite #8927

Description

@sfmskywalker

Phase 3 groundwork of #8898, per ADR Offer selectable BPMN designers (#8926).

Change

  • Define the BPMN designer contract: load (returns { imported, error?, warnings }), save, select, applyOverlays/clearOverlays, change/selection events, dispose. Start from the payload shapes the spike used (Spike: host a bpmn-js modeler in the Blazor Studio #8901).
  • Split designers into Studio modules (for example Elsa.Studio.Bpmn.BpmnJs, Elsa.Studio.Bpmn.X6). The BPMN feature enables bpmn-js when the host enables no designer, and a designer that isn't enabled adds nothing to the download.
  • Put the canvas-independent rules in shared code:
    • the elsa: binding model;
    • DI generation for documents without DI;
    • the save flow that requires explicit acknowledgement after a load warning reports dropped content.
  • Build one conformance suite that every designer must pass:
    • round-trip preservation of elsa: extensions, foreign extensions and attributes, subprocess bodies at every depth, and DI;
    • the load-warning contract;
    • Elsa import equivalence;
    • overlays and events.

Done when

Activity

  1. sfmskywalker commented on Oct 22, 2026

    @sfmskywalker
    MemberAuthor

    [Claude] Decisions from the owner on the open #8927 questions:

    1. Default flip: bpmn-js becomes the default canvas in the same release that adds XML save (PUT bpmn/definitions/{id}/xml, D3), not before. Until then it ships as a selectable designer and X6 stays the default, so the view never loses its fallback-layout diagnostics or its subprocess drill-down while still read-only.
    2. Download: until the flip there is no hard reference from Elsa.Studio.Workflows to the bpmn-js module. With no designer registered, the resolver falls back to X6, and hosts opt into bpmn-js by registering its module. At the flip the reference is added, so the small wrapper DLL ships to every host; the JS bundle stays lazy.
    3. Contract documentation:
      • A spec under studio/docs/specs/ defines "BPMN designer contract v1": methods, getBinding/setBinding, SetBindingResult, the readOnly option, events and the contractVersion rule.
      • The selectable-designers ADR gets one line that names the contract and links to the spec.
    4. "DI preserved" in the conformance suite: every shape keeps its bounds and every edge its waypoints, matched by element id, whichever diagram plane holds them. A plane move, such as bpmn-js moving a legacy collapsed subprocess's contents to its own plane, is reported as a rewritten load warning, and the suite asserts that the warning appears.

    Plan changes:

    • Step 4: the resolver falls back to X6 for now.
    • Step 5 (the default flip) waits for D3.
    • Step 1 adds the contract spec and the ADR link.

    Generated by Claude Code

  2. added this to the 3.11 milestone on Oct 22, 2026
  3. sfmskywalker commented on Oct 22, 2026

    @sfmskywalker
    MemberAuthor

    [Claude] Every "Done when" item has landed on main, so I'm closing this issue.

    What shipped:

    What remains: the X6 designer module (plan step 6) is the work of #8928. Until then, the read-only X6 view shows only BPMN scopes that have no source document, and a host that removes the default.


    Generated by Claude Code

  4. moved this from Backlog to Done in Elsa 3 Crewon Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions