Skip to content

Add BPMN findings, refusal dialogs and import/export - #8949

Merged
sfmskywalker merged 8 commits into
mainfrom
codex/8859-react-studio-bpmn
Oct 21, 2026
Merged

sfmskywalker merged 8 commits into
mainfrom
codex/8859-react-studio-bpmn

Conversation

@sfmskywalker

@sfmskywalker sfmskywalker commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Workflow definitions can now import a BPMN document through the server's interchange API, review Info/Degraded/Dropped findings, select a process, and open the resulting draft in a dedicated read-only native BPMN view. The view never normalizes or autosaves the process root. Capability and expression-condition refusals show stable-code explanations, offending IDs and the original server message. Closing cancels work; confirming uploads the same file used for analysis.

A row action exports BPMN after warning that bindings and expressions are included. Missing source, unknown source version and stale source remain refusals. The public API client adds typed multipart analysis/import and XML-Blob export using shared auth/tenant/cancellation behavior. The browser downloads the server's bytes; the real server can canonicalize XML and add missing layout.

Validation: 131 unit tests, type-check, lint, packed external SDK consumer and frontend/host builds. Ten BPMN browser cases cover findings, process choice, cancellation, capability/condition/export refusals, unknown-error fallback and downloaded XML reimport. The full 23-case browser baseline passed before the review fix; all ten updated BPMN cases pass, including pending analysis/export cancellation and native-root preservation. An actual Core-imported process also retains its exact root after opening the built UI beyond the autosave interval and remains exportable. A disposable real Core API check confirms process/flow preservation, stable canonical XML after reimport, structured expression-condition refusal and temporary-definition cleanup. No original-byte-equality claim is made for server-normalized XML.

Addresses #8853, part of #8859. Stacked on #8947. Editable BPMN canvas work is separate in #8929.

Summary by CodeRabbit

  • New Features

    • Added BPMN import and export support for workflow definitions.
    • Import includes file validation, process selection, findings, cancellation, and clear refusal messages.
    • Export downloads BPMN files and reports unavailable or outdated sources.
    • Added a read-only view for native BPMN definitions.
    • Added API client support for BPMN analysis, import, and export.
  • Documentation

    • Added guides covering BPMN workflows, limitations, permissions, errors, and API usage.
  • Tests

    • Added browser, API, and end-to-end round-trip coverage for BPMN workflows.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 0fc88733-4a30-4663-9e2b-0d9527f1a9d1
📥 Commits

Reviewing files that changed from the base of the PR and between 4f8880d and fb288ca.

📒 Files selected for processing: 1
  • studio/react/dotnet/modules/Elsa.ReactStudio.WorkflowDefinitions/Client/pages/editor-page.tsx

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

📝 Walkthrough

React Studio now supports BPMN analysis, import, export, and read-only viewing. The changes add API types and methods, workflow-list dialogs, cancellation handling, browser and real-server tests, and documentation.

Changes: BPMN interchange

Layer / File(s) Summary
API contract and client
studio/react/packages/api-client/src/types/bpmn.ts, studio/react/packages/api-client/src/endpoints/bpmn.ts, studio/react/packages/api-client/src/index.ts, studio/react/packages/api-client/src/client.ts, studio/react/packages/api-client/src/endpoints/bpmn.test.ts, studio/react/packages/api-client/README.md
The API client exposes BPMN analysis, multipart import, and XML export methods. Public types describe findings, analysis, import results, and options. Tests cover request data and structured refusal responses.
Dialogs and workflow-list integration
studio/react/dotnet/modules/Elsa.ReactStudio.WorkflowDefinitions/Client/components/bpmn-dialogs.tsx, studio/react/dotnet/modules/Elsa.ReactStudio.WorkflowDefinitions/Client/pages/list-page.tsx, studio/react/tests/bpmn.spec.ts
The workflow list provides BPMN import and export actions. The dialogs support file validation, process selection, findings, cancellation, refusal messages, and downloads. Browser tests cover these interactions.
Read-only BPMN definition view
studio/react/dotnet/modules/Elsa.ReactStudio.WorkflowDefinitions/Client/components/bpmn-definition-view.tsx, studio/react/dotnet/modules/Elsa.ReactStudio.WorkflowDefinitions/Client/pages/editor-page.tsx
Native Elsa.BpmnProcess definitions render in a read-only view. Latest definitions can open BPMN export without editable rendering or autosave.
Round-trip verification and documentation
studio/react/scripts/test-bpmn-roundtrip.mjs, studio/react/package.json, studio/react/tests/bpmn.spec.ts, studio/react/docs/bpmn.md, studio/react/README.md, studio/docs/specs/react-studio-preview/plan.md
Real-server and browser checks cover analysis, import, export, re-import, refusals, cancellation, read-only behavior, and cleanup. Documentation and the plan describe BPMN interchange behavior and coverage.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant WorkflowDefinitionsList
  participant BpmnImportDialog
  participant bpmnApi
  participant ServerAPI
  User->>WorkflowDefinitionsList: Open BPMN import
  WorkflowDefinitionsList->>BpmnImportDialog: Render dialog
  BpmnImportDialog->>bpmnApi: Analyze selected file
  bpmnApi->>ServerAPI: Send analysis request
  ServerAPI-->>BpmnImportDialog: Return findings
  User->>BpmnImportDialog: Select process and import
  BpmnImportDialog->>bpmnApi: Import file and process
  bpmnApi->>ServerAPI: Send import request
  ServerAPI-->>WorkflowDefinitionsList: Return imported definition
Loading

Possibly related issues

Merge Risk: ⚪ Minimal · up to fb288

No supported merge-blocking risk remains in the reviewed scope.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 11 files. 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 BPMN findings, refusal-dialog, import, and export changes.
Description check Passed The description is detailed and on topic. It explains the BPMN import/export behavior, refusal handling, cancellation, API changes, verification results, related issues, and scope boundaries. It does …
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 is detailed and on topic. It explains the BPMN import/export behavior, refusal handling, cancellation, API changes, verification results, related issues, and scope boundaries. It does not use the template headings or complete the scope, screenshots, commit-convention, and checklist sections, but the required change and verification information is substantially present.

✨ 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.

Copy link
Copy Markdown
Member Author

@greptileai

Copy link
Copy Markdown
Member Author

@coderabbitai review

Copy link
Copy Markdown
Member Author

@greptileai

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No outstanding findings block merging, with account and tenant isolation dependent on PR #8954 rather than this PR alone.

Summary

Adds BPMN import and export through the shared API client.

  • Workflow authors can review BPMN findings before importing a chosen process.
  • Native BPMN definitions open in a read-only view.
  • Workflow rows can download current BPMN source.
  • The public API client can analyze, import, and export BPMN files.

Both supplied previous findings are addressed: native roots avoid normalization, and browser tests now cover closing pending analysis and export requests. Those threads have no supplied comment numbers.

Protection against results arriving after an account or tenant switch depends on dependent PR #8954; that protection is not in this PR’s head. This assessment depends on that PR for account and tenant isolation.

Reviews (8) · Last reviewed commit: "Merge branch 'codex/8859-react-studio-re..." · Reviewed by Greptile

Comment thread studio/react/tests/bpmn.spec.ts

Copy link
Copy Markdown
Member Author

@greptileai

@sfmskywalker
sfmskywalker marked this pull request as ready for review October 21, 2026 04:20

Copy link
Copy Markdown
Member Author

@greptileai Please review integrated head 4f8880d after the current-main merge.

Copy link
Copy Markdown
Member Author

@coderabbitai review

Current integrated head: 4f8880d

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Member Author

@greptileai Please review final integrated head fb288ca. The latest main is incorporated and the addressed findings are verified and resolved.

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please re-review final integrated head fb288ca; verified fixes and latest main are included.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Member Author

@greptileai Please review pushed head 076767c. All six latest findings have independently verified fixes and resolved threads, with208unit/28host/49browser checks passing locally.

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please re-review pushed head 076767c; the six latest verified fixes have landed and prior threads are resolved.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Base automatically changed from codex/8859-react-studio-release to main October 21, 2026 21:29

Copy link
Copy Markdown
Member Author

User-authorized self-review for #8859.

APPROVE + HIGH @ 076767c

Reviewed BPMN import findings/refusal dialogs, native interchange behavior and export round trips. Editable BPMN modeling remains separately tracked in #8898; the current native BPMN view is read-only.

The final adaptation source passes 227 unit, 28 hosting and 49 browser tests, lint/types, module-boundary and localization checks, and builds for net8/net9/net10. The final six findings and subsequent expression-alias/index and cached-culture findings were fixed with regression coverage before this merge.

At merge time, current-head CI is green, Greptile is 5/5 on this exact head, and the exhaustive stack thread audit records zero unresolved findings. This is an author self-review under the task owner's explicit standing self-review/self-merge authority, not an independent approval. Use the standard head-matched merge into main without changing protection or using an admin bypass.

@sfmskywalker
sfmskywalker merged commit 6bf2252 into main Oct 21, 2026
6 of 8 checks passed
@sfmskywalker
sfmskywalker deleted the codex/8859-react-studio-bpmn branch October 21, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant