{"record":{"id":"3ba7a1d927e0710d","repo":"FlowiseAI/Flowise","slug":"execute-flow-must-have-a-predecessor","errorCode":null,"errorMessage":"Execute Flow must have a predecessor!","messagePattern":"Execute Flow must have a predecessor!","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts","lineNumber":168,"sourceCode":"\n    async init(nodeData: INodeData, input: string, options: ICommonObject): Promise<any> {\n        const selectedFlowId = nodeData.inputs?.selectedFlow as string\n        const _seqExecuteFlowName = nodeData.inputs?.seqExecuteFlowName as string\n        if (!_seqExecuteFlowName) throw new Error('Execute Flow node name is required!')\n        const seqExecuteFlowName = _seqExecuteFlowName.toLowerCase().replace(/\\s/g, '_').trim()\n        const startNewSession = nodeData.inputs?.startNewSession as boolean\n        const appDataSource = options.appDataSource as DataSource\n        const databaseEntities = options.databaseEntities as IDatabaseEntity\n        const sequentialNodes = nodeData.inputs?.sequentialNode as ISeqAgentNode[]\n        const seqExecuteFlowInput = nodeData.inputs?.seqExecuteFlowInput as string\n        const overrideConfig =\n            typeof nodeData.inputs?.overrideConfig === 'string' &&\n            nodeData.inputs.overrideConfig.startsWith('{') &&\n            nodeData.inputs.overrideConfig.endsWith('}')\n                ? JSON.parse(nodeData.inputs.overrideConfig)\n                : nodeData.inputs?.overrideConfig\n\n        if (!sequentialNodes || !sequentialNodes.length) throw new Error('Execute Flow must have a predecessor!')\n\n        const baseURL = (nodeData.inputs?.baseURL as string) || (options.baseURL as string)\n        const returnValueAs = nodeData.inputs?.returnValueAs as string\n\n        // Validate selectedFlowId is a valid UUID\n        if (!selectedFlowId || !isValidUUID(selectedFlowId)) {\n            throw new Error('Invalid flow ID: must be a valid UUID')\n        }\n\n        // Validate baseURL is a valid URL\n        if (!baseURL || !isValidURL(baseURL)) {\n            throw new Error('Invalid base URL: must be a valid URL')\n        }\n\n        const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n        const chatflowApiKey = getCredentialParam('chatflowApiKey', credentialData, nodeData)\n\n        if (selectedFlowId === options.chatflowid) throw new Error('Cannot call the same agentflow!')","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts#L150-L186","documentation":"Same predecessor requirement as the other sequential nodes, enforced for Execute Flow at init: inputs.sequentialNode must be a non-empty array so the node joins the graph with at least one incoming edge.","triggerScenarios":"Execute Flow node placed without a wire from an upstream sequential node; sequentialNode missing/empty in a saved chatflow.","commonSituations":"Forgotten wiring during flow construction; copy/import losing edges.","solutions":["Draw a connection from an upstream sequential node into the Execute Flow's 'Sequential Node' input.","Save the chatflow to persist the edge."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const seq = nodeData.inputs?.sequentialNode\nif (!Array.isArray(seq) || seq.length === 0) throw new Error('Execute Flow must have a predecessor!')","typeGuard":"const hasPredecessor = (n: INodeData): boolean => Array.isArray(n.inputs?.sequentialNode) && (n.inputs!.sequentialNode as any[]).length > 0","tryCatchPattern":null,"preventionTips":["Run a wiring lint pass before save; every non-Start sequential node needs >=1 incoming edge.","Re-verify edges after cloning a flow."],"tags":["sequential-agents","execute-flow","graph-wiring","init"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}