Repository navigation
feat(studio): show tasks bound to the unbound placeholder as not bound, and warn about them - #9048
Conversation
…d, and warn about them Since #9047 an import binds a task without an elsa:activityBinding to the Elsa.BpmnUnboundTask placeholder. Studio read that placeholder as a bound activity. Now: - the problems list gains a warning, marked on the task, for each id in the analysis's unboundElementIds; - the Performed by panel names the placeholder as "Not bound"; - the canvas view-model reports such a task as unbound, so it shows "Not bound" and raises its unbound-work diagnostic again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CfQ8xsHYWP9ZvKcGTTEe1B
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Placeholder binding state studio/src/modules/Elsa.Studio.Workflows.Core/Domain/Models/Bpmn/BpmnProcessConstants.cs, studio/src/modules/Elsa.Studio.Workflows.Core/Domain/Models/Bpmn/BpmnImportAnalysisModel.cs, studio/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/bpmn/view-model.ts, studio/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/bpmn/model.ts, studio/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/bpmn/__tests__/view-model.test.ts |
The view model recognizes Elsa.BpmnUnboundTask as unbound. It retains the binding reference and activity ID, sets other activity metadata to null, and reports an unbound-work warning. |
Warnings and not-bound display studio/src/modules/Elsa.Studio.Workflows/DiagramDesigners/Bpmn/BpmnDocumentProblem.cs, studio/src/modules/Elsa.Studio.Workflows/DiagramDesigners/Bpmn/BpmnPerformedByPanel.razor.cs, studio/src/modules/Elsa.Studio.Workflows.Tests/BpmnModelerSessionProblemsTests.cs, studio/src/modules/Elsa.Studio.Workflows.Tests/BpmnPerformedByPanelTests.cs, core/docs/wiki/bpmn-workflows.md |
Studio creates a warning for each unbound element, marks the task on the canvas, and displays “Not bound” in the “Performed by” panel. The documentation describes these indicators. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant Analysis as BpmnImportAnalysisModel
participant Problems as BpmnDocumentProblem
participant Session as BpmnModelerSession
participant Canvas
Analysis->>Problems: UnboundElementIds
Problems->>Session: Warning for each element ID
Session->>Canvas: Apply warning marker
Possibly related issues
- elsa-workflows/elsa-core issue 8898: The issue lists unbound-task placeholder support as a BPMN v2 Studio milestone. This PR adds Studio handling for that placeholder.
Possibly related PRs
- elsa-workflows/elsa-core#9047: Adds the placeholder type and analysis field consumed by this PR.
- elsa-workflows/elsa-core#9045: Adds the problems pipeline and marker application that this PR extends for unbound tasks.
- elsa-workflows/elsa-core#9044: Adds the element-marker contract used for the warning markers applied by this PR.
Merge Risk: 
Minimal · up to 028b1
-
The traced paths support the intended unbound-task warnings and display. No issue identified here needs resolution before merging.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description covers the purpose, affected Studio areas, problem, solution, verification results, tests, documentation, and checklist. It is mostly complete and aligned with the template, although it does not include screenshots for the UI changes.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 9 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
[Medium impact] The available evidence supports merging; no blocking defects were identified. SummaryStudio now shows tasks backed by The focused ClientLib suites passed 147 tests with no type errors. Chromium checks confirmed that the canvas displays “Not bound” in the warning color, emits the task warning, and preserves activity selection. No actionable issues were found; the available evidence supports merging. Acknowledged behavior: sfmskywalker states that the new warning is Studio-authored English and is intentionally not localized, consistent with the other problems-list messages. T-Rex validation blockedThe focused Studio tests could not execute because
Reviews (1) · Last reviewed commit: "feat(studio): show tasks bound to the un..." · Reviewed by Greptile |
Purpose
This is the Studio half of #9047. Since #9047, an import binds a BPMN task that declares no
elsa:activityBindingto the hiddenElsa.BpmnUnboundTaskplaceholder, and lists it inunboundElementIds. Studio did not know about either change. Part of #8898.Scope
bpmn-workflowswiki.There are no server changes.
Description
Problem
unbound-workwarning, which existed before feat(bpmn): accept unbound tasks at import with a placeholder; default userTask to UserTask #9047, when the task had no binding ref at all.unboundElementIds. A task that blocks publishing was not flagged until the publish failed.Solution
view-model.tsresolves a binding toElsa.BpmnUnboundTaskas'unbound', not'bound'. The canvas therefore shows "Not bound" and raises theunbound-workdiagnostic again. The binding ref and activity id are kept, so selecting the task still maps to its node.BpmnDocumentProblem.From(analysis)adds one warning per id inunboundElementIds, marked on the task.BpmnImportAnalysisModel(Studio) gainsUnboundElementIds.BpmnPerformedByPaneldescribes the placeholder as no activity, so it reads "Not bound".BpmnProcessConstants.UnboundTaskActivityTypeName = "Elsa.BpmnUnboundTask"is added.The warning text is Studio-authored English and is not localized. The other entries in the problems list are server messages and are not localized either.
Verification
dotnet test studio/src/modules/Elsa.Studio.Workflows.Tests -f net10.0passes 621. There are two new tests:AnUnboundTask_IsAWarning;ATaskTheServerBoundToTheUnboundPlaceholder_ReadsAsNotBound.npx vitest run --typecheckpasses 275 with no type errors. The new view-model testreports a task bound to the unbound-task placeholder as unbound, not as bound to itis included.Checklist
core/docs/wiki/bpmn-workflows.md, "Tasks without a binding")🤖 Generated with Claude Code
https://claude.ai/code/session_01CfQ8xsHYWP9ZvKcGTTEe1B
Summary by CodeRabbit