Interface FlowDefinitionService

All Known Implementing Classes:
DefaultFlowDefinitionService

public interface FlowDefinitionService
Flow-definition facade: deploy, list, deprecate. 流程定义门面:部署、查询、弃用。
Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
  • Method Details

    • deploy

      FlowDefinition deploy(String dslJson)
      Deploy a new flow definition from the given JSON DSL. Allocates an id (snowflake) and persists it as ACTIVE. 部署新的流程定义(从 JSON DSL)。分配 id(snowflake)并以 ACTIVE 持久化。
      Parameters:
      dslJson - DSL JSON string — DSL JSON 串
      Returns:
      persisted definition — 已持久化的定义
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • findActive

      Optional<FlowDefinition> findActive(String flowKey)
      Returns the currently active definition for the given business key. 返回业务 key 当前 ACTIVE 的定义。
      Parameters:
      flowKey - business key — 业务 key
      Returns:
      active definition (Optional) — 当前定义(Optional)
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • listVersions

      List<FlowDefinition> listVersions(String flowKey)
      Lists every version of the given business key (asc by version). 列出业务 key 的所有版本(按 version 升序)。
      Parameters:
      flowKey - business key — 业务 key
      Returns:
      all versions — 全部版本
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • deprecate

      void deprecate(String flowKey, int version)
      Deprecate a specific (flowKey, version) definition. 弃用指定 (flowKey, version) 的定义。
      Parameters:
      flowKey - business key — 业务 key
      version - definition version — 定义版本号
      Since:
      JDK 25, opencode-base-flow V1.0.5