Class IllegalActionException

All Implemented Interfaces:
OpenExceptionMeta, Serializable

public class IllegalActionException extends FlowException
Thrown when an action is rejected by the engine's state machine. 当某个动作被引擎状态机拒绝时抛出。

Examples: caller is not the current task owner (FlowErrorCode.TASK_NOT_ASSIGNED_TO_USER), task is already completed (FlowErrorCode.TASK_ALREADY_DONE), the action is not permitted at the current step (FlowErrorCode.ACT_NOT_ALLOWED), or the reject target step is invalid (FlowErrorCode.ACT_INVALID_REJECT_TARGET).

典型场景:调用方非当前任务承接人 (FlowErrorCode.TASK_NOT_ASSIGNED_TO_USER)、任务已完成 (FlowErrorCode.TASK_ALREADY_DONE)、当前节点不允许该动作 (FlowErrorCode.ACT_NOT_ALLOWED)、驳回目标步骤无效 (FlowErrorCode.ACT_INVALID_REJECT_TARGET)等。

Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
See Also:
  • Constructor Details

    • IllegalActionException

      public IllegalActionException(String errorCode, String message)
      Creates a new illegal action exception. 创建非法动作异常。
      Parameters:
      errorCode - stable error code | 稳定错误码
      message - human-readable detail message | 人类可读的详细消息
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • IllegalActionException

      public IllegalActionException(String errorCode, String message, Throwable cause)
      Creates a new illegal action exception with a root cause. 创建带原始异常的非法动作异常。
      Parameters:
      errorCode - stable error code | 稳定错误码
      message - human-readable detail message | 人类可读的详细消息
      cause - underlying cause | 原始异常
      Since:
      JDK 25, opencode-base-flow V1.0.5