Repository navigation
feat(studio): make bpmn-js the default BPMN designer - #9038
Conversation
The workflows module now registers bpmn-js as the default BPMN designer, as the selectable-designers ADR decides: a host that enables no designer gets bpmn-js, and a host that enables any designer uses that one without having to choose between it and the default. - Elsa.Studio.Bpmn: DefaultBpmnDesigner and AddDefaultBpmnDesigner. The resolver falls back to the default only when no designer is enabled; the options may name it. Its existing constructor stays. - Elsa.Studio.Workflows references Elsa.Studio.Bpmn.BpmnJs, which becomes packable, and its bundle joins the packaged browser-asset checks. - Tests that cover the read-only canvas take the default out, since that canvas is what a host gets when no designer resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CfQ8xsHYWP9ZvKcGTTEe1B
[Medium impact] No blocking findings remain; the default preserves explicitly enabled host designers, and the default-view change is intentional. SummaryMakes bpmn-js the default BPMN designer when a host enables none.
The earlier package-ID finding was dismissed by
Reviews (2) · Last reviewed commit: "feat(studio): make bpmn-js the BPMN desi..." · Reviewed by Greptile |
|
@greptileai review The P1 is answered on its thread. Generated by Claude Code |
Purpose
Step 5 of #8927 (epic #8898). With BPMN editing (#9031, #9034), creating BPMN workflows (#9036) and the viewers (#9037) all running through the designer contract, the workflows module now uses bpmn-js. Hosts no longer have to enable a BPMN designer themselves. This follows the selectable-designers ADR: "When a host enables none, the Studio's BPMN feature enables bpmn-js."
Scope
Description
Problem
BpmnDesignerResolverreturned no designer unless the host calledAddBpmnJsDesigner()(or enabled another designer). No packed module did, so out of the box every host kept the read-only X6 BPMN view, and the designer work was unreachable.Elsa.Studio.Bpmn.BpmnJswas not packable.Solution
Elsa.Studio.Bpmn.DefaultBpmnDesignerrecord andAddDefaultBpmnDesigner(descriptor).BpmnDesignerOptions.DesignerIdmay name the default.Elsa.Studio.Workflows.Elsa.Studio.Bpmn.BpmnJs.AddWorkflowsModuleregisters bpmn-js as the default. Its script still loads only when a BPMN canvas opens.Elsa.Studio.Bpmn.BpmnJsbecomes packable, asElsa.Studio.Bpmndid in feat(studio): edit a BPMN workflow's document in the enabled BPMN designer #9031. A packedElsa.Studio.Workflowsnow depends on it.bpmn-js-designer.js,.css) joins the packaged browser-asset checks:CLIENTLIB_ASSETSinprove_consolidated_packages.py, andSTUDIO_CONTENTinvalidate_packages_id_set.py. A pack built without the bundle now fails instead of shipping a default designer whose script 404s.build_studio_clientlibs.shalready builds it.Elsa.AI,Elsa.ExtensionsandElsa.Integrations.Public API
The changes are additive:
DefaultBpmnDesigner;AddDefaultBpmnDesigner;BpmnDesignerResolverconstructor that takes the default.The existing two-parameter constructor remains.
Consequences reviewers should weigh
UseReactFlowstill shows its notice for BPMN, as before.Elsa.Studio.Bpmn.BpmnJspackage.Verification
dotnet test studio/src/modules/Elsa.Studio.Bpmn.Tests: 31 passed.dotnet test studio/src/modules/Elsa.Studio.Workflows.Tests: 603 passed.WorkflowsModuleBpmnDesignerTests:AddWorkflowsModulefails the module test.BpmnEditingTestServices,BpmnNestedScopeDrillDownTests, and the create test's no-designer case) now removeDefaultBpmnDesigner. That is the only configuration in which no designer resolves.python3 -m unittest scripts/test_validate_packages_id_set.pypasses. So dotest_prove_consolidated_packages, run fromscripts/integration-program, andtest_prove_consolidated_package_consumers.python3 scripts/solution/solution_groups.py --checkis clean.dotnet buildofElsa.Studio.Workflowson net8.0, net9.0 and net10.0: no errors.Screenshots / Recordings (if applicable)
Not applicable: no new UI. The viewers and editor that now become the default were added in #9031, #9034, #9036 and #9037.
Checklist
Generated by Claude Code
Summary by CodeRabbit