* Extract valid field names from a child workflow's start block inputFormat * * @param childWorkflowBlocks - The blocks from the child workflow state * @returns Set of valid field names defined in the child's inputFormat
(childWorkflowBlocks: Record<string, any>)
| 13 | * @returns Set of valid field names defined in the child's inputFormat |
| 14 | */ |
| 15 | function extractValidInputFieldNames(childWorkflowBlocks: Record<string, any>): Set<string> | null { |
| 16 | const fields = extractInputFieldsFromBlocks(childWorkflowBlocks) |
| 17 | |
| 18 | if (fields.length === 0) { |
| 19 | logger.debug('No inputFormat fields found in child workflow') |
| 20 | return null |
| 21 | } |
| 22 | |
| 23 | return new Set(fields.map((field) => field.name)) |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Clean up orphaned inputMapping fields that don't exist in child workflow's inputFormat. |
no test coverage detected