Commit Graph
27 Commits
Author SHA1 Message Date
0264408andCursor 8d08a2840b 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>
2026-09-20 11:45:23 +08:00
0264408andCursor f0ddaf7694 refactor: split public types into definition, runtime, and spi packages
Keep Maven modules unchanged. Hosts import models and SPIs from the new packages; OrdoEngine stays at com.jetlumen.ordo.api.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 11:18:10 +08:00
0264408andCursor d743939964 feat: dispatch NamedAction and NamedCondition by key
Hosts register one bean per action/condition; Spring wires the dispatcher when no facade is defined, and REST catalog projects from those beans.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 11:07:57 +08:00
0264408andCursor e4e2c6ed9b feat: pass ProcessRuntime to host SPIs
Keep initiator and instance identity off ProcessContext variables so AssigneeResolver, RoutingCondition, and ActionHandler can read them from a dedicated runtime view.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 10:40:16 +08:00
0264408andCursor e4478656c1 feat: add structured PARALLEL blocks with join-all tokens
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 18:17:53 +08:00
0264408andCursor 0e9bb4bd16 refactor: extract shared Texts, Jsons, and SqlBindings helpers
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 11:20:34 +08:00
0264408andCursor 1f6e33c14b feat: evaluate built-in routing predicates and parameterized host conditions
Store transition when as JSON instead of a lookup key so designers can compose closed-set logic while hosts still supply complex refs with args. Match conditional edges before the unconditional default.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 11:09:50 +08:00
0264408 e177e9592a chore: delete useless docs 2026-09-17 10:30:52 +08:00
0264408andCursor 0288a8b3dd feat: add optional Spring REST adapter and catalog SPI
Expose OrdoEngine over conditionally registered HTTP endpoints in autoconfigure, keep JDBC wiring in spring.jdbc, and share definition JSON via ProcessDefinitionParser.toJson.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 10:30:09 +08:00
0264408andCursor 7d17157633 feat: add a pluggable JDBC dialect layer with MySQL support
Fold Flyway V1-V7 into per-dialect baselines and resolve Boot 3/4 Flyway customizer types without a DataSource creation cycle.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 11:05:14 +08:00
0264408andCursor 9bda7c417c feat: pin running instances to immutable published definition versions
Replace register/replace with publish so new graphs can ship without rewriting old ones, and keep in-flight work on the version it started with.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 10:30:14 +08:00
0264408andCursor 8bc628613d feat: cancel running instances as CANCELLED without initiator checks
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 09:47:58 +08:00
0264408andCursor 30047f3612 feat: escalate overdue approval tasks via processDue
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 09:23:30 +08:00
0264408andCursor 850583f326 feat: let the current assignee reassign a pending task
Keep the same task id, move the pending inbox, and record TASK_REASSIGNED without advancing the step.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 08:40:25 +08:00
0264408andCursor 5795778112 chore: target Java 17 and document usage plus roadmap
Lower the compiler baseline to 17, rename listDefinitions to queryDefinitions, and align README/usage/roadmap with planned vs out-of-scope work.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 10:55:30 +08:00
0264408andCursor f3220fd0a0 feat: persist process history events, listeners, and ACTION executions
Give hosts an append-only timeline, post-commit OrdoEventListener hooks, and durable ACTION results without blocking the approval flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 10:14:44 +08:00
0264408 77d1e5198b feat: Implement pagination and filtering for approval tasks and process instances
- Added query method to InMemoryApprovalTaskRepository for filtering and pagination of approval tasks.
- Enhanced InMemoryProcessInstanceRepository with query method for filtering and pagination of process instances.
- Introduced Page and PageRequest classes for handling paginated results.
- Updated JdbcApprovalTaskRepository and JdbcProcessInstanceRepository to support querying with pagination.
- Added tests for querying, filtering, and pagination in InMemory and JDBC repositories.
- Implemented dynamic WHERE clause building for SQL queries in PageSupport.
2026-09-15 08:56:05 +08:00
0264408 e83234e98a fix: change postgresql dependency scope from runtime to test 2026-09-15 08:28:17 +08:00
0264408andCursor bdc4dd4473 feat: add ACTION steps that run after the approval transaction commits
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 17:26:02 +08:00
0264408andCursor 87b449e45c feat: let initiators withdraw running process instances
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 16:39:17 +08:00
0264408andCursor 946c9d3c52 feat: replace process definition graphs when no instance is running
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 16:15:17 +08:00
0264408andCursor a6410b3dc4 feat: load process definitions from classpath JSON
Map the existing graph model from files so hosts can register flows without Java literals. Existing ids still insert-only on restart.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 19:48:25 +08:00
0264408andCursor 58ec867eab feat: add explicit conditional routing for approval steps
Require ProcessDefinition transitions so the engine can branch or end by conditionKey, persist them in JDBC, and pin repository text files to LF.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 18:56:59 +08:00
0264408 581823290a feat: support multi-approver steps with ANY/ALL policy
- ApprovalStep now has candidates + ApprovalPolicy (ANY/ALL) instead of a single assignee; ApprovalStep.single(...) kept as a convenience factory for the single-approver case
- AssigneeResolver resolves per-candidate; TaskStatus gains SKIPPED for auto-skipped sibling tasks
- DefaultOrdoEngine creates one task per candidate and advances per-step according to policy (ANY: first approval wins and skips the rest, only rejects once everyone rejects; ALL: fail-fast on first rejection, only advances once everyone approves)
- Added ApprovalTaskRepository.findByInstanceIdAndStepId and JDBC/in-memory implementations
- Added V2 migration: ordo_approval_step.policy column + ordo_step_candidate table
- Updated ApprovalStepMapper/ApprovalTaskMapper/JdbcProcessDefinitionRepository for the new schema, handling null action for SKIPPED tasks
- Migrated all call sites (tests, ordo-example, rhizome demo) to ApprovalStep.single(...) and the 3-arg AssigneeResolver
- Added ANY/ALL policy test coverage; fixed JdbcTestSupport to apply the V2 migration and strip SQL comments before splitting on ';'
2026-09-10 18:20:33 +08:00
0264408 c524c74289 fix: cross-Boot-version autoconfiguration and CI-friendly version resolution
- OrdoJdbcAutoConfiguration: use string-based @AutoConfigureAfter(name = ...)
  to reference both Spring Boot 3.x and 4.x DataSource/Flyway autoconfiguration
  classes, since Boot 4 relocated these to dedicated modules.
- flatten-maven-plugin: switch flattenMode from resolveCiFriendliesOnly to
  defaults so inter-module dependency versions are fully resolved (not just
  the project's own <version>) when installed, fixing dependency resolution
  for external consumers.
- Align sibling-module dependency versions to use \ consistently.
- Ignore generated .flattened-pom.xml files.
2026-09-10 10:26:59 +08:00
0264408 c782e6cdc3 feat: add spring boot autoconfiguration and starter modules with JDBC support 2026-09-09 11:08:17 +08:00
0264408andClaude Code 397a9c229b feat: initial approval workflow engine with in-memory and JDBC storage
Lightweight linear approval engine (v0.1):

- ordo-api: domain model, OrdoEngine port, repository SPI with
  conditional updates (insertIfAbsent, completeIfPending) and a
  TransactionExecutor port for atomic multi-step writes
- ordo-core: DefaultOrdoEngine running register/start/approve/reject
  inside a transaction boundary; in-memory engine and repositories
- ordo-storage-jdbc: thread-bound JDBC transactions, normalized V1
  schema migration, Jackson-based ProcessContext JSON codec
- tests: unit tests plus H2 integration tests; PostgreSQL integration
  tests run against a local instance via ordo.test.pg.* properties and
  skip when unreachable

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-08 16:56:04 +08:00