Record Class FlowDefinition
java.lang.Object
java.lang.Record
cloud.opencode.base.flow.model.FlowDefinition
- Record Components:
id- unique definition id — 定义 ID(base-id snowflake)flowKey- business key — 业务 keyversion- business version number — 业务版本号name- human-friendly name — 流程名称dslJson- original DSL JSON — 原始 DSL JSONstatus- lifecycle status — 生命周期状态steps- parsed steps (immutable) — 解析后的步骤(不可变)transitions- parsed transitions (immutable) — 解析后的流转(不可变)createdAt- creation timestamp — 创建时间createdBy- creator id — 创建人
public record FlowDefinition(String id, String flowKey, int version, String name, String dslJson, FlowStatus status, List<Step> steps, List<Transition> transitions, Instant createdAt, String createdBy)
extends Record
Deployed flow definition (immutable view of
flow_definition row + parsed DSL).
已部署的流程定义(flow_definition 行 + 解析后 DSL 的不可变视图)。
steps and transitions are copied with List.copyOf(java.util.Collection)
on construction, so the record is deeply immutable (modulo Step.assignees
which is itself an immutable copy).
steps 与 transitions 在构造时通过 List.copyOf(java.util.Collection)
拷贝,记录是深度不可变的。
- Since:
- JDK 25, opencode-base-flow V1.0.5
- Author:
- Leon Soo
-
Constructor Summary
ConstructorsConstructorDescriptionFlowDefinition(String id, String flowKey, int version, String name, String dslJson, FlowStatus status, List<Step> steps, List<Transition> transitions, Instant createdAt, String createdBy) Compact constructor; deeply copies the step / transition lists. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.Returns the value of thecreatedByrecord component.dslJson()Returns the value of thedslJsonrecord component.final booleanIndicates whether some other object is "equal to" this one.flowKey()Returns the value of theflowKeyrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.status()Returns the value of thestatusrecord component.steps()Returns the value of thestepsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransitionsrecord component.intversion()Returns the value of theversionrecord component.
-
Constructor Details
-
FlowDefinition
public FlowDefinition(String id, String flowKey, int version, String name, String dslJson, FlowStatus status, List<Step> steps, List<Transition> transitions, Instant createdAt, String createdBy) Compact constructor; deeply copies the step / transition lists. 紧凑构造器:对步骤/流转列表做深拷贝。- Throws:
NullPointerException- when a required argument is null- Since:
- JDK 25, opencode-base-flow V1.0.5
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
-
flowKey
-
version
-
name
-
dslJson
-
status
-
steps
-
transitions
Returns the value of thetransitionsrecord component.- Returns:
- the value of the
transitionsrecord component
-
createdAt
-
createdBy
-