fix(workflow-executor): accept null title/prompt/aiConfigName in step definitions#1753
fix(workflow-executor): accept null title/prompt/aiConfigName in step definitions#1753Scra3 wants to merge 1 commit into
Conversation
… definitions The orchestrator serializes missing BPMN attributes as JSON null (DOM getAttribute), not absent keys — z.string().optional() rejected null and an unnamed gateway or promptless step failed with an opaque DomainValidationError while preparing the step. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (1)
🛟 Help
|
|
Reviewed — the fix itself is correct and independently safe (pure widening: Checklist before merge: The "Why" misattributes the customer symptom. Sequencing: this must be released — and installed at customers — before ForestAdmin/forestadmin-server#8360 deploys; details in my comment there. 🤖 Posted by Claude Code on Brian's behalf |
|
The collection-schema fix referenced in the review comment (the actual cause of the customer's "Internal validation error … preparing this step" on Get Data) is now open: ForestAdmin/forestadmin-server#8361. Server-side, no executor release needed, mergeable independently of this PR. 🤖 Posted by Claude Code on Brian's behalf |

Why
A customer running migrated browser-engine workflows on the orchestrator hit
Internal validation error occurred while preparing the step(DomainValidationError). The orchestrator serializes missing BPMN attributes as JSONnull(DOMgetAttributesemantics — seebpmn-parser.tsgetPrompt()returningnullexplicitly), while the executor's shared step-definition fields usedz.string().optional(), which acceptsundefinedbut rejectsnull.What
title/prompt/aiConfigNamenow acceptnulland normalize it toundefined(.nullish().transform()), keeping the inferred output typestring | undefinedfor all consumers.ServerWorkflowStepBase) now tell the truth:title: string | null,prompt?: string | null.title: null/prompt: nullmap successfully.Companion server-side fix: unnamed manual gateways no longer hard-fail BPMN parsing (browser-engine parity) — ForestAdmin/forestadmin-server
fix/workflow-unnamed-manual-gateways.🤖 Generated with Claude Code
Note
Accept null
title,prompt, andaiConfigNamein workflow step definitionsoptionalStringzod helper in step-definition.ts that acceptsnullorundefinedand normalizes both toundefinedafter parsing.sharedFieldsto use this helper forprompt,aiConfigName, andtitle, replacingz.string().optional().ServerWorkflowStepBaseandServerWorkflowTaskBasein server-types.ts to reflect the broadened types.title/promptfor conditions and tasks.Macroscope summarized ee29ae0.