docs: sync package layout and REST with current API

Host examples and README still described the pre-split packages and omitted optional REST.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
0264408
2026-09-20 11:45:23 +08:00
co-authored by Cursor
parent f0ddaf7694
commit 8d08a2840b
3 changed files with 34 additions and 6 deletions
+1
View File
@@ -20,6 +20,7 @@
- 管理员/系统取消 `cancel` / `CANCELLED`
- 可选 REST(autoconfigure 条件装配)+ 目录 SPI `OrdoCatalog`
- `NamedAction` / `NamedCondition` 注册与官方 key 分发;默认 Catalog 从具名 Bean 投影
- API 分包:`api.definition` / `runtime` / `spi` / `util`
## 开发计划(确定要做)
+17 -1
View File
@@ -22,6 +22,18 @@ Ordo 是嵌入宿主进程的审批引擎,入口是 `OrdoEngine`。
| `ordo-spring-boot-starter` | Spring Boot 自动装配 |
| `ordo-example` | `LeaveRequestExample` 内存演示 |
Java 包(模块未变):
| 包 | 内容 |
|---|---|
| `com.jetlumen.ordo.api` | `OrdoEngine`、`TransactionExecutor` |
| `com.jetlumen.ordo.api.definition` | 图:定义、步骤、边、`when`、PARALLEL |
| `com.jetlumen.ordo.api.runtime` | 实例、任务、事件、ACTION 执行、token、`ProcessRuntime` |
| `com.jetlumen.ordo.api.spi` | `ActionHandler`、`NamedAction`、`RoutingCondition`、`NamedCondition`、`AssigneeResolver`、`OrdoCatalog`、`OrdoEventListener` |
| `com.jetlumen.ordo.api.util` | `Texts`、`Jsons` |
| `com.jetlumen.ordo.api.exception` / `query` / `repository` | 异常、分页查询、存储端口 |
| `com.jetlumen.ordo.core.spi` | `DispatchingActionHandler`、`DispatchingRoutingCondition`、`RegistryOrdoCatalog` |
Starter **不携带** JDBC 驱动。生产按库添加 `org.postgresql:postgresql` 或 `com.mysql:mysql-connector-j`。Spring Boot 4 还需 `spring-boot-starter-flyway`,否则 Flyway 迁移不会执行。
先 `mvn install` 本仓库,宿主再依赖 `0.0.1-SNAPSHOT`。
@@ -85,7 +97,7 @@ ordo:
未提供 `NamedAction` 且未覆盖 `ActionHandler` 时,ACTION 步骤仍会推进流程,但 handler 什么都不做。不要同时提供门面 Bean 与对应 `Named*`(门面优先,具名 Bean 不参与运行时)。
内存引擎把 `DispatchingRoutingCondition.of(...)` / `DispatchingActionHandler.of(...)` 传入 `InMemoryOrdoEngine` 即可。
内存引擎把 `com.jetlumen.ordo.core.spi.DispatchingRoutingCondition.of(...)` / `DispatchingActionHandler.of(...)` 传入 `InMemoryOrdoEngine` 即可。
### 2.3 可选 REST
@@ -314,6 +326,10 @@ v1:至少 2 条分支;禁止套娃 PARALLEL;join 固定 ALL;任一分支
**失败不回滚已提交的审批,不阻塞后续步骤,引擎不做重试。** 宿主用 `queryActionExecutions` 或 listener 自行补发。分发器遇到未知 `actionKey` 会抛 `IllegalArgumentException`,记为该次 ACTION `FAILED`。
```java
import com.jetlumen.ordo.api.runtime.ProcessRuntime;
import com.jetlumen.ordo.api.spi.NamedAction;
import org.springframework.stereotype.Component;
@Component
public class LeaveApprovedMail implements NamedAction {
@Override