{"record":{"id":"d846a3d885ce385e","repo":"conductor-oss/conductor","slug":"null-input-passed-when-starting-workflow","errorCode":null,"errorMessage":"NULL input passed when starting workflow","messagePattern":"NULL input passed when starting workflow","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java","lineNumber":2809,"sourceCode":"        return workflow;\n    }\n\n    /**\n     * Performs validations for starting a workflow\n     *\n     * @throws IllegalArgumentException if the validation fails.\n     */\n    private void validateWorkflow(\n            WorkflowDef workflowDef,\n            Map<String, Object> workflowInput,\n            String externalStoragePath) {\n        // Check if the input to the workflow is not null\n        if (workflowInput == null && StringUtils.isBlank(externalStoragePath)) {\n            LOGGER.error(\"The input for the workflow '{}' cannot be NULL\", workflowDef.getName());\n            Monitors.recordWorkflowStartError(\n                    workflowDef.getName(), WorkflowContext.get().getClientApp());\n\n            throw new IllegalArgumentException(\"NULL input passed when starting workflow\");\n        }\n    }\n\n    private void notifyWorkflowStatusListener(WorkflowModel workflow, WorkflowEventType event) {\n        try {\n            switch (event) {\n                case STARTED:\n                    workflowStatusListener.onWorkflowStartedIfEnabled(workflow);\n                    break;\n                case RERAN:\n                    workflowStatusListener.onWorkflowRerunIfEnabled(workflow);\n                    break;\n                case RETRIED:\n                    workflowStatusListener.onWorkflowRetriedIfEnabled(workflow);\n                    break;\n                case PAUSED:\n                    workflowStatusListener.onWorkflowPausedIfEnabled(workflow);\n                    break;","sourceCodeStart":2791,"sourceCodeEnd":2827,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java#L2791-L2827","documentation":"Thrown by validateWorkflow() when both workflowInput is null AND externalStoragePath is blank. Conductor requires every workflow to have input — either inline (the workflowInput map) or referenced by an external storage URI (e.g., an S3 path). Starting with neither means the workflow's tasks will receive null input, leading to downstream failures. The method also records a workflow start error metric before throwing.","triggerScenarios":"Calling startWorkflow / startWorkflowIdempotent with a null workflowInput map and no externalInputPayloadStoragePath. Passing an empty StartWorkflowInput where both getWorkflowInput() returns null and getExternalInputPayloadStoragePath() is blank.","commonSituations":"Workflow definition has no schemaVersion or input schema, and the caller omits input entirely. External storage path field is misconfigured or left empty. A client SDK serializes an empty input object as null rather than an empty map.","solutions":["Provide a non-null workflowInput map (even an empty {} map satisfies the check).","If input is large, set externalInputPayloadStoragePath to a valid external storage URI (e.g., s3://bucket/key).","Ensure your client SDK or REST caller always includes an input field — check for accidental null serialization.","If the workflow genuinely needs no input, pass an empty Map: Map.of()."],"exampleFix":"// before\nStartWorkflowInput input = StartWorkflowInput.builder()\n    .name(\"myWorkflow\")\n    .workflowInput(null)\n    .build();\n\n// after\nStartWorkflowInput input = StartWorkflowInput.builder()\n    .name(\"myWorkflow\")\n    .workflowInput(new HashMap<>())  // or Map.of()\n    .build();","handlingStrategy":"validation","validationCode":"// Ensure input is provided before starting\nMap<String, Object> input = input.getWorkflowInput();\nif (input == null && StringUtils.isBlank(input.getExternalInputPayloadStoragePath())) {\n    input.setWorkflowInput(new HashMap<>()); // default to empty map\n}\nworkflowExecutor.startWorkflow(input);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass at least an empty map as workflowInput.","Validate StartWorkflowInput in client code before sending to the server.","If using external storage, verify the path is non-blank and accessible."],"tags":["workflow-start","validation","input","external-storage"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}