conductor-oss/conductor · error · IllegalArgumentException
workflowId is required
Error message
workflowId is required
What it means
Thrown by FileStorageServiceImpl.createFile when the request's workflowId is null or blank. A file is always scoped to a workflow, so a workflowId is mandatory to build the storage path and the metadata record. Raised as IllegalArgumentException (maps to HTTP 400).
Source
Thrown at core/src/main/java/org/conductoross/conductor/core/storage/FileStorageServiceImpl.java:65
private final FileMetadataDAO fileMetadataDAO;
private final FileStorageProperties properties;
private final WorkflowFamilyResolver workflowFamilyResolver;
public FileStorageServiceImpl(
FileStorage fileStorage,
FileMetadataDAO fileMetadataDAO,
FileStorageProperties properties,
WorkflowFamilyResolver workflowFamilyResolver) {
this.fileStorage = fileStorage;
this.fileMetadataDAO = fileMetadataDAO;
this.properties = properties;
this.workflowFamilyResolver = workflowFamilyResolver;
}
@Override
public FileUploadResponse createFile(FileUploadRequest request) {
if (request.getWorkflowId() == null || request.getWorkflowId().isBlank()) {
throw new IllegalArgumentException("workflowId is required");
}
String fileId = UUID.randomUUID().toString();
String storagePath = STORAGE_PATH.formatted(request.getWorkflowId(), fileId);
FileModel model =
FileModelConverter.toFileModel(
request, fileId, storagePath, fileStorage.getStorageType());
fileMetadataDAO.createFileMetadata(model);
String uploadUrl =
fileStorage.generateUploadUrl(storagePath, properties.getSignedUrlExpiration());
long expiresAt = Instant.now().plus(properties.getSignedUrlExpiration()).toEpochMilli();
return FileModelConverter.toFileUploadResponse(model, uploadUrl, expiresAt);
}
@OverrideView on GitHub (pinned to cf7c3e4a8a)
Solutions
- Set workflowId on the FileUploadRequest to a valid (existing) workflow id.
- Validate the request field name matches workflowId exactly.
- Create/obtain the workflow id first, then create the file.
Example fix
// before
FileUploadRequest req = new FileUploadRequest();
req.setFileName("report.csv");
// workflowId not set -> IllegalArgumentException
fileStorageService.createFile(req);
// after
req.setWorkflowId(workflowRunId);
fileStorageService.createFile(req); Defensive patterns
Strategy: validation
Validate before calling
if (request.getWorkflowId() == null || request.getWorkflowId().isBlank()) {
// reject before calling the API
} Try / catch
try {
fileStorageService.createFile(req);
} catch (IllegalArgumentException e) {
// workflowId missing
} Prevention
- Always set workflowId on FileUploadRequest
- Create the workflow run first to obtain its id
When it happens
Trigger: POST create-file with a request body whose workflowId field is missing, null, or whitespace. Also if the field is omitted in the JSON payload.
Common situations: Client SDK not setting workflowId; misnamed field in the payload (e.g. workflow_id vs workflowId); deserialization dropping the field; calling createFile before a workflow id is known.
Related errors
- Skill manifest name '{manifestName}' does not match package
- Skill {name} version {version} already exists with a differe
- File path is required
- skillRef is required
- Skill manifest is required
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/649a2a23920645f4.
Report an issue: GitHub.