conductor-oss/conductor · error · IllegalArgumentException
priority MUST be between 0 and 99 (inclusive)
Error message
priority MUST be between 0 and 99 (inclusive)
What it means
Workflow.setPriority enforces that task scheduling priority is an integer in the closed range [0, 99]. Values below 0 or above 99 are rejected immediately. Priority influences the relative scheduling precedence of a workflow's tasks.
Source
Thrown at common/src/main/java/com/netflix/conductor/common/run/Workflow.java:421
* @return the external storage path of the workflow output payload
*/
public String getExternalOutputPayloadStoragePath() {
return externalOutputPayloadStoragePath;
}
/**
* @return the priority to define on tasks
*/
public int getPriority() {
return priority;
}
/**
* @param priority priority of tasks (between 0 and 99)
*/
public void setPriority(int priority) {
if (priority < 0 || priority > 99) {
throw new IllegalArgumentException("priority MUST be between 0 and 99 (inclusive)");
}
this.priority = priority;
}
/**
* Convenience method for accessing the workflow definition name.
*
* @return the workflow definition name.
*/
public String getWorkflowName() {
if (workflowDefinition == null) {
throw new NullPointerException("Workflow definition is null");
}
return workflowDefinition.getName();
}
/**
* Convenience method for accessing the workflow definition version.View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Clamp the priority into [0, 99] before setting it.
- Use 0 (default/lowest) when priority is unspecified instead of a sentinel like -1.
- Validate the value at the API/config boundary before it reaches Workflow.
Example fix
// before: out-of-range value throws workflow.setPriority(requestedPriority); // after: clamp into valid range int p = Math.max(0, Math.min(99, requestedPriority)); workflow.setPriority(p);
Defensive patterns
Strategy: validation
Validate before calling
// Validate priority range before setting
static boolean isValidPriority(int p) {
return p >= 0 && p <= 99;
}
if (!isValidPriority(requestedPriority)) {
throw new IllegalArgumentException("priority must be 0..99, got " + requestedPriority);
} Try / catch
// Clamp or reject out-of-range priority at the boundary
try {
workflow.setPriority(requestedPriority);
} catch (IllegalArgumentException e) {
workflow.setPriority(Math.max(0, Math.min(99, requestedPriority)));
} Prevention
- Clamp priority to [0, 99] at the API/config boundary.
- Use 0 for 'unspecified' instead of sentinel values like -1.
- Validate priority in UI/config forms before submission.
When it happens
Trigger: Calling workflow.setPriority(n) (or submitting a workflow payload with a 'priority' field) where n < 0 or n > 99.
Common situations: UI or config passing 100 or 999 as a 'max priority' sentinel; negative values from a default/unset integer (-1); arithmetic that overflows the intended range.
Related errors
- workflowDefinition is a string, but not a valid DSL string
- workflowDefinition must be either null, or WorkflowDef, or a
- Model string cannot be null or empty
- Invalid model format: '%s'. Expected 'provider/model'.
- NULL input passed when starting workflow
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/b2007c42401cbde3.
Report an issue: GitHub.