elsa-core/src/modules
Sipke Schoorstra 8955f9ad34
feat(bpmn): interchange endpoints (analyze, import, export) (#7954)
* feat(bpmn): add Analyze/Import/Export endpoints to Elsa.Bpmn.Interchange

Thin FastEndpoints wrappers over Bpmn.Interchange, sharing one
BpmnInterchangeDocumentService so Analyze and Import can never disagree
about what a document costs. Import surfaces capability refusal
(BpmnCapabilityRequirements.Analyze, walked into nested processes) with
the missing capability and offending element ids, and reuses
BpmnWorkBinder to bind the root BpmnProcess scope. Export re-reads the
original XML persisted alongside the workflow definition and re-runs it
through BpmnXmlWriter, so retained extension elements, foreign
attributes and BPMN DI layout survive the round trip without being
reconstructed from the reduced Elsa activity graph.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(bpmn): make a stale BPMN export refuse instead of mislead

Export now refuses with 422 (naming the reason) when a workflow definition's
BPMN source is missing or no longer matches the definition's version, rather
than exporting stale or absent content while reporting success. Import
records the definition's version alongside the source XML so Export can
detect drift caused by a later save replacing custom properties wholesale.

Also: the interchange package now consumes the runtime host's declared
capability set from a new public Elsa.Bpmn.Hosting.BpmnRuntimeCapabilities
instead of restating it (one value, one home); the Import endpoint's
capability-refusal message no longer misattributes driving elements across
capabilities; the three BPMN REST endpoints get HTTP-level test coverage
(multipart validation, exception-to-status-code mapping, permission gating);
and the wiki documents the endpoints and Export's known limitation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test(bpmn): alert when the library defines a capability Elsa does not declare

Restores the deleted comparison between BpmnRuntimeCapabilities.Declared (ours)
and BpmnHostCapabilities.Full (the library's) — these are two different
constants, not the tautology the earlier deletion assumed. The pinned
Bpmn.Semantics 0.1.1-preview.19 currently defines exactly the four flags Elsa
declares, so capability refusal at import/build is wired but unreachable; this
test is what will say the moment a library bump changes that, and its failure
message names the decision (implement and declare, or leave undeclared on
purpose) rather than just failing silently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(bpmn): return 400 for a malformed export version and clarify a partial-import refusal

- Export/Endpoint.cs: a non-numeric or out-of-range VersionOptions query value now returns a
  400 naming the offending value instead of throwing through FromString and bubbling into a 500.
- BpmnInterchangeDocumentService: the message shown when a definition carries BPMN source but not
  its version marker (a second save that never completed after ImportAsync's first) now says so
  explicitly, distinct from "never imported" and "stale".
- BpmnInterchangeDocumentService: replace the implicit filter in EnsureCapabilitiesSatisfied's
  foreach with an explicit .Where(...), same behaviour.
- Test projects: extract the duplicated ReadAsset/Path.Combine helper in
  BpmnInterchangeTestBase and BpmnInterchangeEndpointTests into a single BpmnAssetReader, guarded
  against a rooted or nested file name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(bpmn): write both BPMN import markers in one save

Move the BPMN source XML off the pre-import model and onto the same
explicit save that already records the definition's version, so a
failed or cancelled post-import save leaves neither custom property
behind instead of a partial, undiagnosable state. Update
BpmnAssetReader to use Path.Join instead of Path.Combine so its
rooted/nested-name guard is defence-in-depth rather than the only
thing standing between the code and a wrong path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 05:20:42 +02:00
..
Elsa Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.AI.Abstractions Add Weaver grounding tools 2026-06-08 15:40:10 +02:00
Elsa.AI.Copilot Update safe dependency patch versions 2026-06-22 00:03:50 +02:00
Elsa.AI.Host Add Weaver grounding tools 2026-06-08 15:40:10 +02:00
Elsa.AI.Persistence.EFCore Move AI EF Core migrations to provider projects 2026-06-08 15:22:59 +02:00
Elsa.AI.Persistence.EFCore.MySql Move AI EF Core migrations to provider projects 2026-06-08 15:22:59 +02:00
Elsa.AI.Persistence.EFCore.Oracle Move AI EF Core migrations to provider projects 2026-06-08 15:22:59 +02:00
Elsa.AI.Persistence.EFCore.PostgreSql Move AI EF Core migrations to provider projects 2026-06-08 15:22:59 +02:00
Elsa.AI.Persistence.EFCore.Sqlite Move AI EF Core migrations to provider projects 2026-06-08 15:22:59 +02:00
Elsa.AI.Persistence.EFCore.SqlServer Move AI EF Core migrations to provider projects 2026-06-08 15:22:59 +02:00
Elsa.Alterations Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Alterations.Core
Elsa.Bpmn feat(bpmn): interchange endpoints (analyze, import, export) (#7954) 2026-08-18 05:20:42 +02:00
Elsa.Bpmn.Interchange feat(bpmn): interchange endpoints (analyze, import, export) (#7954) 2026-08-18 05:20:42 +02:00
Elsa.Caching Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Common Fix tenant service mutation race (#7898) 2026-07-30 02:47:44 +02:00
Elsa.Dashboard.Abstractions Refactor dashboard API contributors (#7690) 2026-06-02 22:25:25 +02:00
Elsa.Dashboard.Api Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Diagnostics.ConsoleLogs Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Diagnostics.ConsoleLogs.Dashboard Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Diagnostics.OpenTelemetry Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Diagnostics.StructuredLogs Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Diagnostics.StructuredLogs.Dashboard Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Diagnostics.StructuredLogs.Persistence.Relational Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Diagnostics.StructuredLogs.Persistence.Sqlite chore: apply safe dependency upgrades (#7896) 2026-07-26 21:42:27 +02:00
Elsa.Dsl.ElsaScript Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Expressions Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Expressions.CSharp Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Expressions.JavaScript Adopt the Jint 4.15 host-integration surface: lazy type globals, enum names, and register-what-is-referenced (#7895) 2026-08-17 01:44:03 +02:00
Elsa.Expressions.JavaScript.Libraries Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Expressions.Liquid Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Expressions.Python Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.ExternalAuthentication Add architecture and practices documentation 2026-08-03 23:46:38 +02:00
Elsa.ExternalAuthentication.OpenIdConnect Add OpenID Connect authentication features 2026-07-26 23:38:20 +02:00
Elsa.ExternalAuthentication.Persistence.EFCore Add architecture and practices documentation 2026-08-03 23:46:38 +02:00
Elsa.ExternalAuthentication.Persistence.EFCore.MySql Fix external authentication review findings 2026-08-02 03:35:39 +02:00
Elsa.ExternalAuthentication.Persistence.EFCore.Oracle Fix external authentication review findings 2026-08-02 03:35:39 +02:00
Elsa.ExternalAuthentication.Persistence.EFCore.PostgreSql Fix external authentication review findings 2026-08-02 03:35:39 +02:00
Elsa.ExternalAuthentication.Persistence.EFCore.Sqlite Fix external authentication review findings 2026-08-02 03:35:39 +02:00
Elsa.ExternalAuthentication.Persistence.EFCore.SqlServer Fix external authentication review findings 2026-08-02 03:35:39 +02:00
Elsa.ExternalAuthentication.Secrets Merge compact external authentication secret IDs 2026-08-02 00:22:29 +02:00
Elsa.Hosting.Management feat: introduce HTTP webhooks module 2026-08-03 02:08:15 +02:00
Elsa.Http Guard HTTP fault handling when workflow reload returns null (#7714) 2026-06-14 22:23:38 +02:00
Elsa.Http.Webhooks feat: introduce HTTP webhooks module 2026-08-03 02:08:15 +02:00
Elsa.Identity Harden external identity race compensation 2026-08-02 23:19:49 +02:00
Elsa.KeyValues Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Labels Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Persistence.EFCore Remove migration for external authentication in EFCore.Sqlite module 2026-07-31 14:31:18 +02:00
Elsa.Persistence.EFCore.Common test: cover Oracle bulk upsert SQL generation 2026-07-11 14:35:36 +02:00
Elsa.Persistence.EFCore.MySql Remove migration for external authentication in EFCore.Sqlite module 2026-07-31 14:31:18 +02:00
Elsa.Persistence.EFCore.Oracle Remove migration for external authentication in EFCore.Sqlite module 2026-07-31 14:31:18 +02:00
Elsa.Persistence.EFCore.PostgreSql Remove migration for external authentication in EFCore.Sqlite module 2026-07-31 14:31:18 +02:00
Elsa.Persistence.EFCore.Sqlite Remove migration for external authentication in EFCore.Sqlite module 2026-07-31 14:31:18 +02:00
Elsa.Persistence.EFCore.SqlServer Remove migration for external authentication in EFCore.Sqlite module 2026-07-31 14:31:18 +02:00
Elsa.Persistence.VNext Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Persistence.VNext.Extensions Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Persistence.VNext.MongoDb Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Persistence.VNext.PostgreSql Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Persistence.VNext.Relational Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Persistence.VNext.Runtime Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Persistence.VNext.Sqlite chore: apply safe dependency upgrades (#7896) 2026-07-26 21:42:27 +02:00
Elsa.Persistence.VNext.SqlServer Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Platform.Integration Add Platform integration 2026-06-18 18:27:27 +02:00
Elsa.Resilience Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Resilience.Core
Elsa.SasTokens Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Scheduling address greptile review feedback (greploop iteration 1) 2026-06-21 19:43:09 +02:00
Elsa.Secrets Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Secrets.JavaScript Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Secrets.Persistence.EFCore Use shared secret name normalization 2026-06-01 22:28:38 +02:00
Elsa.Secrets.Persistence.EFCore.MySql Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Secrets.Persistence.EFCore.Oracle Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Secrets.Persistence.EFCore.PostgreSql Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Secrets.Persistence.EFCore.Sqlite Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Secrets.Persistence.EFCore.SqlServer Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Secrets.Persistence.VNext Add Persistence vNext provider-neutral POC 2026-06-02 21:05:21 +02:00
Elsa.Shells.Api feat: introduce HTTP webhooks module 2026-08-03 02:08:15 +02:00
Elsa.Tenants Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Tenants.AspNetCore Merge release/3.8.0 into bugfix/7900-tenant-request-services 2026-08-03 00:48:56 +02:00
Elsa.WorkflowProviders.BlobStorage Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.WorkflowProviders.BlobStorage.ElsaScript Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Workflows.Api Merge release/3.8.0 into main 2026-08-14 11:59:35 +02:00
Elsa.Workflows.Core fix(runtime): let a trigger index payloads under per-payload stimulus names (#7950) 2026-08-17 23:43:59 +02:00
Elsa.Workflows.Management Merge release/3.8.0 into main 2026-08-14 11:59:35 +02:00
Elsa.Workflows.Runtime fix(runtime): let a trigger index payloads under per-payload stimulus names (#7950) 2026-08-17 23:43:59 +02:00
Elsa.Workflows.Runtime.Dashboard Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00
Elsa.Workflows.Runtime.Distributed Address workflow commit review feedback 2026-06-23 02:27:06 +02:00
Directory.Build.props Remove PackageManifestCategories and update feature categories to inline strings 2026-06-08 09:48:55 +02:00