Skip to content

feat(studio): show tasks bound to the unbound placeholder as not bound, and warn about them - #9048

Merged
sfmskywalker merged 1 commit into
mainfrom
feat/bpmn-studio-unbound-warnings
Oct 24, 2026
Merged

sfmskywalker merged 1 commit into
mainfrom
feat/bpmn-studio-unbound-warnings

Conversation

@sfmskywalker

@sfmskywalker sfmskywalker commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Purpose

This is the Studio half of #9047. Since #9047, an import binds a BPMN task that declares no elsa:activityBinding to the hidden Elsa.BpmnUnboundTask placeholder, and lists it in unboundElementIds. Studio did not know about either change. Part of #8898.

Scope

  • Studio BPMN problems list.
  • The "Performed by" panel.
  • The canvas view-model (ClientLib).
  • The bpmn-workflows wiki.

There are no server changes.

Description

Problem

Solution

  • Canvas: view-model.ts resolves a binding to Elsa.BpmnUnboundTask as 'unbound', not 'bound'. The canvas therefore shows "Not bound" and raises the unbound-work diagnostic again. The binding ref and activity id are kept, so selecting the task still maps to its node.
  • Problems list: BpmnDocumentProblem.From(analysis) adds one warning per id in unboundElementIds, marked on the task. BpmnImportAnalysisModel (Studio) gains UnboundElementIds.
  • Performed by: BpmnPerformedByPanel describes the placeholder as no activity, so it reads "Not bound".
  • Constant: 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

  • Studio tests: dotnet test studio/src/modules/Elsa.Studio.Workflows.Tests -f net10.0 passes 621. There are two new tests:
    • AnUnboundTask_IsAWarning;
    • ATaskTheServerBoundToTheUnboundPlaceholder_ReadsAsNotBound.
  • ClientLib: npx vitest run --typecheck passes 275 with no type errors. The new view-model test reports a task bound to the unbound-task placeholder as unbound, not as bound to it is included.
  • Each new test fails without its source change.

Checklist

  • Builds
  • Tests added and passing
  • Docs updated (core/docs/wiki/bpmn-workflows.md, "Tasks without a binding")
  • No public API removed; the additions are a constant and a model property
  • No unrelated changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01CfQ8xsHYWP9ZvKcGTTEe1B

Summary by CodeRabbit

  • Bug Fixes
    • Unbound BPMN tasks are now identified as such instead of appearing bound to a placeholder activity.
    • The BPMN editor marks unbound tasks with a warning, and the “Performed by” panel shows them as “Not bound.”
    • Warnings explain that an activity must be selected before the workflow can be published.

…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
@sfmskywalker sfmskywalker added this to the 3.11 milestone Oct 24, 2026 — with Cursor
@sfmskywalker sfmskywalker added enhancement New feature or request elsa 3 This issue is specific to Elsa 3 area:studio Quality loop area: studio prio medium labels Oct 24, 2026 — with Cursor
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 63b4c48d-ce75-4047-af87-0b0b1bcd058a
Commits

Reviewing files that changed from the base of the PR and between bec020d and 028b135.

Files selected for processing: 10
  • core/docs/wiki/bpmn-workflows.md
  • studio/src/modules/Elsa.Studio.Workflows.Core/Domain/Models/Bpmn/BpmnImportAnalysisModel.cs
  • studio/src/modules/Elsa.Studio.Workflows.Core/Domain/Models/Bpmn/BpmnProcessConstants.cs
  • studio/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/bpmn/__tests__/view-model.test.ts
  • studio/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/bpmn/model.ts
  • studio/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/bpmn/view-model.ts
  • studio/src/modules/Elsa.Studio.Workflows.Tests/BpmnModelerSessionProblemsTests.cs
  • studio/src/modules/Elsa.Studio.Workflows.Tests/BpmnPerformedByPanelTests.cs
  • studio/src/modules/Elsa.Studio.Workflows/DiagramDesigners/Bpmn/BpmnDocumentProblem.cs
  • studio/src/modules/Elsa.Studio.Workflows/DiagramDesigners/Bpmn/BpmnPerformedByPanel.razor.cs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

Studio identifies BPMN tasks bound to the Elsa.BpmnUnboundTask placeholder as unbound. It reports each analyzed unbound task as a warning, marks the task on the canvas, and displays “Not bound” in the “Performed by” panel.

Changes: BPMN unbound-task handling

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: Normal

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
Loading

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

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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main Studio changes: showing tasks bound to the unbound placeholder as not bound and warning about them.
Description check Passed 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 i…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
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.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The available evidence supports merging; no blocking defects were identified.

Summary

Studio now shows tasks backed by Elsa.BpmnUnboundTask as “Not bound.” The canvas preserves the task’s activity ID and restores its warning, the BPMN problems list adds a warning for each UnboundElementIds entry, and the “Performed by” fallback hides the placeholder’s name.

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 blocked

The focused Studio tests could not execute because dotnet is unavailable on PATH and the conventional installation directories are absent. The problems-list and Blazor panel behavior therefore remain unverified at runtime.

  • The canvas shows placeholder-bound tasks as not bound.
  • The problems list warns on each task with no activity.
  • The “Performed by” panel calls placeholder work “Not bound.”

Reviews (1) · Last reviewed commit: "feat(studio): show tasks bound to the un..." · Reviewed by Greptile

@sfmskywalker
sfmskywalker merged commit 1c8b885 into main Oct 24, 2026
18 checks passed
@sfmskywalker
sfmskywalker deleted the feat/bpmn-studio-unbound-warnings branch October 24, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:studio Quality loop area: studio elsa 3 This issue is specific to Elsa 3 enhancement New feature or request prio medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant