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

Thrown by WorkflowModel.setPriority when the priority value is less than 0 or greater than 99. Priority is an integer field used for task/workflow scheduling precedence. The valid range is 0–99 inclusive. This is an IllegalArgumentException, typically caught at the API/controller layer as a 400 Bad Request.

Source

Thrown at core/src/main/java/com/netflix/conductor/model/WorkflowModel.java:343

    public void setExternalInputPayloadStoragePath(String externalInputPayloadStoragePath) {
        this.externalInputPayloadStoragePath = externalInputPayloadStoragePath;
    }

    public String getExternalOutputPayloadStoragePath() {
        return externalOutputPayloadStoragePath;
    }

    public void setExternalOutputPayloadStoragePath(String externalOutputPayloadStoragePath) {
        this.externalOutputPayloadStoragePath = externalOutputPayloadStoragePath;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        if (priority < 0 || priority > 99) {
            throw new IllegalArgumentException("priority MUST be between 0 and 99 (inclusive)");
        }
        this.priority = priority;
    }

    public Map<String, Object> getVariables() {
        return variables;
    }

    public void setVariables(Map<String, Object> variables) {
        this.variables = variables;
    }

    public long getLastRetriedTime() {
        return lastRetriedTime;
    }

    public void setLastRetriedTime(long lastRetriedTime) {
        this.lastRetriedTime = lastRetriedTime;

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Set the priority to a value between 0 and 99 inclusive in the workflow start request or model.
  2. Add client-side validation to clamp or reject priority values outside [0, 99] before sending the request.
  3. If migrating from a different priority scale, map values proportionally into the 0–99 range.

Example fix

// before
workflowModel.setPriority(100);  // throws
workflowModel.setPriority(-5);   // throws

// after
workflowModel.setPriority(99);   // ok — max allowed
workflowModel.setPriority(0);     // ok — min allowed
Defensive patterns

Strategy: validation

Validate before calling

// Validate priority before setting it on the workflow model
public static int validatePriority(int priority) {
    if (priority < 0 || priority > 99) {
        throw new IllegalArgumentException(
            "Priority must be between 0 and 99 (inclusive), got: " + priority);
    }
    return priority;
}

workflowModel.setPriority(validatePriority(requestedPriority));

Type guard

public static boolean isValidPriority(int priority) {
    return priority >= 0 && priority <= 99;
}

Prevention

When it happens

Trigger: Starting a workflow or updating a workflow model with a priority value outside [0, 99] — e.g. priority=100, priority=-1, or a miscalculation that produces an out-of-range value. Can also occur when a SubWorkflowParams priority field or API request body contains an invalid priority.

Common situations: Passing priority=100 or higher in a workflow start request. A UI or client that allows arbitrary integer input for priority without bounds checking. Programmatic workflow start with a computed priority that overflows the range. Migration from a system with a different priority scale (e.g. 0-1000).

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/557ce2b51fb9b820. Report an issue: GitHub.