{"record":{"id":"1eedde2ab89ef2a0","repo":"iflytek/astron-agent","slug":"parse-input-param-type-failed","errorCode":"PARSE_INPUT_PARAM_TYPE_FAILED","errorMessage":"ResponseEnum.PARSE_INPUT_PARAM_TYPE_FAILED","messagePattern":"ResponseEnum\\.PARSE_INPUT_PARAM_TYPE_FAILED","errorType":"error_code","errorClass":"BusinessException","httpStatus":null,"severity":"error","filePath":"console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java","lineNumber":4728,"sourceCode":"        }\n\n        String data = workflow.getData();\n        if (StringUtils.isBlank(data)) {\n            log.error(\"Workflow protocol is empty, id=\" + flowId);\n            throw new BusinessException(ResponseEnum.WORKFLOW_PROTOCOL_EMPTY);\n        }\n\n        BizWorkflowData bizWorkflowData = JSON.parseObject(data, BizWorkflowData.class);\n        List<BizWorkflowNode> nodes = bizWorkflowData.getNodes();\n        for (BizWorkflowNode node : nodes) {\n            if (node.getId().startsWith(WorkflowConst.NodeType.START)) {\n                // Parse input\n                List<BizInputOutput> outputs = node.getData().getOutputs();\n                return JsonConverter.flowInputTypeConvert(JSON.toJSONString(outputs));\n            }\n        }\n\n        throw new BusinessException(ResponseEnum.PARSE_INPUT_PARAM_TYPE_FAILED);\n    }\n\n    public Object getInputsInfo(String flowId) {\n        Workflow workflow = getOne(Wrappers.lambdaQuery(Workflow.class).eq(Workflow::getFlowId, flowId));\n        if (workflow == null) {\n            log.error(\"Flow not found, id=\" + flowId);\n            throw new BusinessException(ResponseEnum.NO_WORKFLOW);\n        }\n\n        String data = workflow.getData();\n        if (StringUtils.isBlank(data)) {\n            log.error(\"Workflow protocol is empty, id=\" + flowId);\n            throw new BusinessException(ResponseEnum.WORKFLOW_PROTOCOL_EMPTY);\n        }\n\n        BizWorkflowData bizWorkflowData = JSON.parseObject(data, BizWorkflowData.class);\n        List<BizWorkflowNode> nodes = bizWorkflowData.getNodes();\n        for (BizWorkflowNode node : nodes) {","sourceCodeStart":4710,"sourceCodeEnd":4746,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/workflow/WorkflowService.java#L4710-L4746","documentation":"PARSE_INPUT_PARAM_TYPE_FAILED is thrown when the service scans the workflow protocol for a Start node (id starting with WorkflowConst.NodeType.START) to derive the flow's input parameter types, but no matching Start node is found. The protocol JSON parsed fine, yet its node list contains no start node whose outputs can be converted.","triggerScenarios":"Calling the getInputsInfo-style flow-input endpoint with a flow whose data JSON has nodes but none whose id begins with the START prefix — e.g. the canvas was saved without a start node, the start node was deleted, or the node id format changed between protocol versions.","commonSituations":"Hand-edited or imported workflow JSON missing the start node; protocol produced by an older exporter with different node-id conventions; a corrupted canvas save that dropped the start node.","solutions":["Open the workflow in the editor and confirm a Start node exists and is connected; re-save the flow.","Inspect the flow's data JSON and check whether any node id starts with the START prefix expected by WorkflowConst.NodeType.","If importing/migrating flows, run a pre-import validation that requires exactly one start node.","Upgrade/align the protocol version so node ids match what this console build expects."],"exampleFix":"// before\n// flow saved with only an LLM node -> PARSE_INPUT_PARAM_TYPE_FAILED\n// after\n// editor save guard: disallow saving unless exactly one node id starts with \"start\"\nif (nodes.stream().noneMatch(n -> n.getId().startsWith(WorkflowConst.NodeType.START))) {\n    throw new ValidationException(\"Workflow must contain a Start node before saving\");\n}","handlingStrategy":"validation","validationCode":"BizWorkflowData proto = JSON.parseObject(wf.getData(), BizWorkflowData.class);\nboolean hasStart = proto.getNodes() != null && proto.getNodes().stream()\n    .anyMatch(n -> n.getId() != null && n.getId().startsWith(WorkflowConst.NodeType.START));\nif (!hasStart) throw new IllegalStateException(\"Workflow has no Start node\");","typeGuard":null,"tryCatchPattern":"try {\n    return workflowService.getInputsInfo(flowId);\n} catch (BusinessException e) {\n    if (\"PARSE_INPUT_PARAM_TYPE_FAILED\".equals(e.getCode())) {\n        return ApiResult.error(\"Flow must contain a Start node to derive inputs\");\n    }\n    throw e;\n}","preventionTips":["Enforce exactly one Start node in the editor's save validation.","Validate imported workflow JSON for a start node before ingestion.","Keep node-id conventions stable across protocol versions; version the schema.","Add an automated test asserting every seed/template flow contains a start node."],"tags":["workflow","start-node","protocol","java"],"backgroundTag":"unexpected-response-shape","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}