Repository navigation
feat(flows): try a flow against an object without effect (dry-run) - #4753
Merged
Merged
Conversation
POST /api/flows/{id}/dry-run {register, schema, objectId} walks the flow
through the real engine with a preview dispatcher. Steps that declare
IFlowSideEffectFree (set-fields, switch, route, filter, merge, explode,
end, the triggers) run, so branches are decided as in a run; every other
step is described and not performed. object-write previews its fields;
send-email, send-notification and send-talk-message preview their
composed recipients and text (FlowMessagePreview, recipients resolved
through FlowRecipientAddresses, which now owns resolveRecipients). The
marking lives on an unsaved run record, the object is read with the
caller's RBAC and without a read audit, and nothing is sent. Gated by the
flow.update right.
Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| test-l10n | ✅ | ||||
| test-l10n-parity | ✅ | ||||
| format | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 173/173 | |||
| npm | ✅ | ✅ 648/648 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ✅ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-10-21 17:18 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a way to try a flow against a chosen object without running it for real. It powers dossiq's "Testen met een zaak" button on the flow page (board DqFlow). Please don't merge yet; this is up for review.
The endpoint
POST /api/flows/{id}/dry-runtakes{register, schema, objectId}. It walks the flow's graph through the realFlowEngine, but with aPreviewStepDispatcherin place ofRegistryStepDispatcher. Branches are therefore decided exactly as in a real run. The answer lists the steps the engine reached, in order. Each step carriesnodeId,type,label,status,itemsIn,itemsOutand apreview, and the answer ends with the run's end status.What a dry-run performs and what it only describes
IFlowSideEffectFreeinterface are performed: set-fields, switch, route, filter, merge, explode, end and the three triggers. Performing them keeps the items that later conditions read the same as in a real run.IFlowNodePreviewinterface says what it would do:FlowMessagePreviewwith the same recipient resolution and templating a real send uses.Guarantees and access
FlowRun, no run row is queued, and the object is read with the caller's own RBAC and without a read audit entry (_audit: false).flow.updateright. It answers 401 without a session, 403 without the right, 400 without an object, and 404 for a flow or object the caller cannot reach.FlowDryRunControllerbecause FlowController's constructor is already at its limit.Refactor
resolveRecipientsmoves fromFlowMessagingServiceintoFlowRecipientAddresses, unchanged, so the send path and the preview share it. This also keepsFlowMessagingServiceunder phpmd's class-length limit.Tests
PreviewStepDispatcherTest,FlowDryRunServiceTest(real engine, a switch flow tried against two objects),FlowDryRunControllerTest, two previews inFlowMessagingServiceTest, and one inObjectWriteNodeTest.FlowMessagingServiceExternalRecipientsTest, all of which also fail on development in a standalone checkout.Spec
openspec/changes/flow-dry-run.Written with Claude Code (claude-opus-5-5).
🤖 Generated with Claude Code