fix(workflow-executor): accept null title/prompt/aiConfigName in step definitions#1753
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 |
… null ServerWorkflowCondition and ServerWorkflowEscalation re-declared prompt as string, narrowing the widened base back to non-null even though the orchestrator serializes a missing prompt as null (the exact case the fix targets, hit on an unnamed BPMN gateway condition). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## @forestadmin/workflow-executor [1.17.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/workflow-executor@1.17.0...@forestadmin/workflow-executor@1.17.1) (2026-07-16) ### Bug Fixes * **workflow-executor:** accept null title/prompt/aiConfigName in step definitions ([#1753](#1753)) ([7988452](7988452))

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 definitionsThe BPMN orchestrator serializes missing attributes as
null, which previously caused validation failures. A newoptionalStringzod helper in step-definition.ts acceptsnullorundefinedand normalizes both toundefined. Thetitle,prompt, andaiConfigNamefields insharedFieldsnow use this helper, and the server-type interfaces are updated to reflect nullable values.Macroscope summarized 95975b3.