elsa-core/test/integration/Elsa.Bpmn.Interchange.IntegrationTests
Sipke Schoorstra 3bee566657
feat(bpmn): give BPMN interchange refusals stable error codes (#8067)
* feat(bpmn): give BPMN import/export/document refusals stable error codes

Studio has to recognise a BPMN import/export refusal, and extract capability
names and element ids, by matching the server's message text, so any rewording
silently degrades it to a generic error. Add BpmnErrorCodes with a stable code
per refusal (capability-unsupported, binding-invalid, export not-imported/
source-stale/source-version-unknown, and the document PUT's not-found and
precondition codes), sent through an additive BpmnErrorResponse envelope that
keeps today's statusCode/message/errors shape unchanged and adds code/data
alongside it, since FastEndpoints' own error response has no way to surface a
ValidationFailure's error code in this deployment's configuration. Rename the
Import/Export exception cascades to *ErrorResponses to say what they now do.

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

* refactor(bpmn): fold BpmnErrorResponseFactory and BpmnErrorResponseSender into BpmnErrorResponse

Both were thin, single-purpose wrappers around BpmnErrorResponse used only by
the import/export error mapping and one endpoint — a Middle Man chain. Create
and SendAsync now live as static members on BpmnErrorResponse itself; call
sites are unchanged otherwise, and the wire output is byte-identical.

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 00:10:12 -07:00
..
Assets feat(bpmn): GET and PUT the BPMN document as library-format JSON (#8060) 2026-09-11 21:16:32 -07:00
Endpoints feat(bpmn): give BPMN interchange refusals stable error codes (#8067) 2026-09-12 00:10:12 -07:00
Scenarios fix(bpmn): detect designer-edited drafts as stale BPMN source (#8065) 2026-09-11 22:46:58 -07:00
Support feat(bpmn): GET and PUT the BPMN document as library-format JSON (#8060) 2026-09-11 21:16:32 -07:00
BpmnInterchangeFeatureTests.cs feat(bpmn): scaffold Elsa.Bpmn and Elsa.Bpmn.Interchange modules (#7938) 2026-08-13 01:17:46 +02:00
Elsa.Bpmn.Interchange.IntegrationTests.csproj feat(bpmn): interchange endpoints (analyze, import, export) (#7954) 2026-08-18 05:20:42 +02:00