Enum Class FlowErrorCode
- All Implemented Interfaces:
Serializable, Comparable<FlowErrorCode>, Constable
All codes share the BASE-FLOW- prefix as required by the design
baseline (v4 §14). Enum constants follow DOMAIN_DETAIL naming
(DSL / DEF / INST / TASK / ACT / RES / EXPR / CONC / CFG / INPUT).
The wire-format code() is the contract that callers should match
against; the defaultMessage() is a fallback English description
suitable for logging when no i18n bundle is available.
所有错误码遵循设计基线(v4 §14)要求统一以 BASE-FLOW- 为前缀。
枚举常量采用 领域_细节 命名(DSL / DEF / INST / TASK / ACT / RES /
EXPR / CONC / CFG / INPUT)。code() 是调用方应匹配的契约串;
defaultMessage() 是英文兜底描述,当未引入 i18n 包时用于日志。
Total: 24 codes (design v4 §7.2; expanded from 23 to 24 during the 1.0.5 post-R2 hardening pass to add a dedicated database-access failure code — see R1 S-4).
共 24 项(设计方案 v4 §7.2;1.0.5 R2 后收尾阶段由 R1 S-4 修复带入, 由 23 项扩到 24 项,新增数据库访问失败码)。
- Since:
- JDK 25, opencode-base-flow V1.0.5
- Author:
- Leon Soo
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdd-sign chain exceeded the configured depth limit.Reject target step id is invalid (not visited in history).The requested action is not permitted at the current step.Withdraw failed due towithdraw-policyconstraint.Illegal configuration value (e.g. table-prefix regex mismatch).Optimistic-lock version conflict (concurrent modification).Generic database access failure at runtime — connection drop, deadlock, timeout, or any other JDBC error not specifically classified above.Attempt to use a deprecated flow definition.Duplicate(flow_key, version)on deploy.Duplicate step id within the same flow definition.JSON structure invalid (e.g. malformed, missing required field).Illegal value forstrategy/mode/typeenums.Transition references a non-existent step id. transitions 引用了不存在的节点 id。DSL document exceeds parser quotas (size / depth / array length).UnsupportedschemaVersion.DSL references a${expr}but noExpressionEvaluatorwas injected.User-supplied text field exceeds length limit or contains illegal control characters.Flow instance has already ended (COMPLETED / TERMINATED / WITHDRAWN).Flow instance not found.AssigneeResolverreturned an empty user list.toUserId/ user validation failed (e.g. user not found).Task is already completed.Task is not assigned to the calling user (ownership pre-check failure).Task not found. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the stable wire-format error code, e.g.Returns the fallback English message used when no i18n bundle is wired.static FlowErrorCodeReturns the enum constant of this class with the specified name.static FlowErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DSL_INVALID
JSON structure invalid (e.g. malformed, missing required field). JSON 结构非法(如格式错误、缺必填字段)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DSL_DUP_STEP_ID
Duplicate step id within the same flow definition. 同一流程定义内节点 id 重复。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DSL_INVALID_REFERENCE
Transition references a non-existent step id. transitions 引用了不存在的节点 id。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DSL_INVALID_ENUM
Illegal value forstrategy/mode/typeenums.strategy/mode/type等枚举取值非法。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DSL_UNSUPPORTED_SCHEMA_VERSION
UnsupportedschemaVersion.schemaVersion不被当前引擎支持。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DSL_QUOTA_EXCEEDED
DSL document exceeds parser quotas (size / depth / array length). DSL 文档超出解析配额(大小 / 嵌套深度 / 数组长度)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DEF_DUPLICATE
Duplicate(flow_key, version)on deploy. 部署时(flow_key, version)已存在。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DEF_DEPRECATED
Attempt to use a deprecated flow definition. 尝试使用已弃用的流程定义。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
INST_NOT_FOUND
Flow instance not found. 流程实例不存在。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
INST_ENDED
Flow instance has already ended (COMPLETED / TERMINATED / WITHDRAWN). 流程实例已结束(COMPLETED / TERMINATED / WITHDRAWN)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
TASK_NOT_FOUND
Task not found. 任务不存在。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
TASK_NOT_ASSIGNED_TO_USER
Task is not assigned to the calling user (ownership pre-check failure). 任务不属于当前调用用户(所有权前置校验失败)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
TASK_ALREADY_DONE
Task is already completed. 任务已完成。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
ACT_NOT_ALLOWED
The requested action is not permitted at the current step. 当前节点不允许该动作。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
ACT_INVALID_REJECT_TARGET
Reject target step id is invalid (not visited in history). 驳回目标步骤无效(history 中未出现过)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
ACT_WITHDRAW_FORBIDDEN
Withdraw failed due towithdraw-policyconstraint. 撤回违反withdraw-policy约束。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
ACT_ADDSIGN_DEPTH_EXCEEDED
Add-sign chain exceeded the configured depth limit. 加签链超出配置的深度上限。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
RES_RESOLVER_RETURNED_EMPTY
AssigneeResolverreturned an empty user list.AssigneeResolver返回了空的用户列表。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
RES_USER_VALIDATION_FAILED
toUserId/ user validation failed (e.g. user not found).toUserId或用户校验失败(如用户不存在)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
EXPR_EVALUATOR_NOT_PROVIDED
DSL references a${expr}but noExpressionEvaluatorwas injected. DSL 引用了${expr}但未注入ExpressionEvaluator。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
CONC_VERSION_CONFLICT
Optimistic-lock version conflict (concurrent modification). 乐观锁版本冲突(并发修改)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
CFG_INVALID_VALUE
Illegal configuration value (e.g. table-prefix regex mismatch). 配置值非法(如 table-prefix 不匹配正则约束)。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
INPUT_INVALID_TEXT
User-supplied text field exceeds length limit or contains illegal control characters. 用户提交的文本字段超长或含非法控制字符。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
DB_ACCESS_FAILURE
Generic database access failure at runtime — connection drop, deadlock, timeout, or any other JDBC error not specifically classified above. This code is distinct fromCFG_INVALID_VALUE, which is reserved for startup / schema configuration errors (e.g. illegal table-prefix); it lets callers distinguish transient infrastructure faults from invalid configuration when deciding whether to retry. 通用数据库访问失败(连接抖动 / 死锁 / 超时 / 其它运行时 JDBC 错误)。 与CFG_INVALID_VALUE(启动 / schema 期配置错误)明确分离, 便于调用方区分基础设施抖动与配置非法,从而决定是否重试。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
code
Returns the stable wire-format error code, e.g."BASE-FLOW-INST-001". 返回稳定的契约错误码,例如"BASE-FLOW-INST-001"。- Returns:
- the error code | 错误码
- Since:
- JDK 25, opencode-base-flow V1.0.5
-
defaultMessage
Returns the fallback English message used when no i18n bundle is wired. 返回未引入 i18n 包时使用的英文兜底消息。- Returns:
- the default message | 默认消息
- Since:
- JDK 25, opencode-base-flow V1.0.5
-