Class RejectOperation
java.lang.Object
cloud.opencode.base.flow.operation.RejectOperation
Reject action — v4 §8.4:
targetStepId = "_INITIATOR_"→ rollback tosteps[0], cancel pending tasks, re-enter step 0targetStepId = null→ go to the previous approve/vote step inferred from history- otherwise → must be a step id visited in history; jump there
- Since:
- JDK 25, opencode-base-flow V1.0.5
- Author:
- Leon Soo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringReserved magic string for "back to initiator". — 起草点回退保留字。 -
Constructor Summary
ConstructorsConstructorDescriptionRejectOperation(FlowRepository repo, HistoryWriter history, TransitionResolver router, StepEntry stepEntry) Construct a reject operation. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(Task task, FlowDefinition def, String targetStepId, String comment) Execute the reject action.
-
Field Details
-
TARGET_INITIATOR
Reserved magic string for "back to initiator". — 起草点回退保留字。- See Also:
-
-
Constructor Details
-
RejectOperation
public RejectOperation(FlowRepository repo, HistoryWriter history, TransitionResolver router, StepEntry stepEntry) Construct a reject operation. 构造驳回操作。- Parameters:
repo- persistence facade — 持久化门面history- history writer — 历史追加器router- transition resolver — 流转解析器stepEntry- step entry helper — 节点进入工具- Since:
- JDK 25, opencode-base-flow V1.0.5
-
-
Method Details
-
execute
Execute the reject action. 执行驳回操作。R1 S-5: the full body (task UPDATE + history + cancel batches + instance UPDATE + target-step re-entry) runs inside
FlowRepository.runInTransaction(Runnable)so a partial failure rolls back atomically on JDBC backends.R1 S-5:整段(task UPDATE + history + 批量取消 + 实例 UPDATE + 目标节点重入) 置于
FlowRepository.runInTransaction(Runnable),JDBC 后端可原子回滚。- Parameters:
task- already-validated owned PENDING task — 已校验任务def- flow definition — 流程定义targetStepId- reject target (see class Javadoc) — 驳回目标comment- sanitised comment (nullable) — 已清洗意见- Since:
- JDK 25, opencode-base-flow V1.0.5
-