{"record":{"id":"557ce2b51fb9b820","repo":"conductor-oss/conductor","slug":"priority-must-be-between-0-and-99-inclusive-557ce2","errorCode":null,"errorMessage":"priority MUST be between 0 and 99 (inclusive)","messagePattern":"priority MUST be between 0 and 99 \\(inclusive\\)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/model/WorkflowModel.java","lineNumber":343,"sourceCode":"    public void setExternalInputPayloadStoragePath(String externalInputPayloadStoragePath) {\n        this.externalInputPayloadStoragePath = externalInputPayloadStoragePath;\n    }\n\n    public String getExternalOutputPayloadStoragePath() {\n        return externalOutputPayloadStoragePath;\n    }\n\n    public void setExternalOutputPayloadStoragePath(String externalOutputPayloadStoragePath) {\n        this.externalOutputPayloadStoragePath = externalOutputPayloadStoragePath;\n    }\n\n    public int getPriority() {\n        return priority;\n    }\n\n    public void setPriority(int priority) {\n        if (priority < 0 || priority > 99) {\n            throw new IllegalArgumentException(\"priority MUST be between 0 and 99 (inclusive)\");\n        }\n        this.priority = priority;\n    }\n\n    public Map<String, Object> getVariables() {\n        return variables;\n    }\n\n    public void setVariables(Map<String, Object> variables) {\n        this.variables = variables;\n    }\n\n    public long getLastRetriedTime() {\n        return lastRetriedTime;\n    }\n\n    public void setLastRetriedTime(long lastRetriedTime) {\n        this.lastRetriedTime = lastRetriedTime;","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/model/WorkflowModel.java#L325-L361","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Set the priority to a value between 0 and 99 inclusive in the workflow start request or model.","Add client-side validation to clamp or reject priority values outside [0, 99] before sending the request.","If migrating from a different priority scale, map values proportionally into the 0–99 range."],"exampleFix":"// before\nworkflowModel.setPriority(100);  // throws\nworkflowModel.setPriority(-5);   // throws\n\n// after\nworkflowModel.setPriority(99);   // ok — max allowed\nworkflowModel.setPriority(0);     // ok — min allowed","handlingStrategy":"validation","validationCode":"// Validate priority before setting it on the workflow model\npublic static int validatePriority(int priority) {\n    if (priority < 0 || priority > 99) {\n        throw new IllegalArgumentException(\n            \"Priority must be between 0 and 99 (inclusive), got: \" + priority);\n    }\n    return priority;\n}\n\nworkflowModel.setPriority(validatePriority(requestedPriority));","typeGuard":"public static boolean isValidPriority(int priority) {\n    return priority >= 0 && priority <= 99;\n}","tryCatchPattern":null,"preventionTips":["Always validate priority is in [0, 99] on the client side before sending the request.","Use bounded input controls (e.g. dropdown or slider) in the UI for priority selection.","Document the 0–99 range prominently in API documentation."],"tags":["workflow-model","priority","validation","input-validation"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}