Files
hms/crates/erp-workflow/src/lib.rs
iven 91ecaa3ed7 feat(workflow): add workflow engine module (Phase 4)
Implement complete workflow engine with BPMN subset support:

Backend (erp-workflow crate):
- Token-driven execution engine with exclusive/parallel gateway support
- BPMN parser with flow graph validation
- Expression evaluator for conditional branching
- Process definition CRUD with draft/publish lifecycle
- Process instance management (start, suspend, terminate)
- Task service (pending, complete, delegate)
- PostgreSQL advisory locks for concurrent safety
- 5 database tables: process_definitions, process_instances,
  tokens, tasks, process_variables
- 13 API endpoints with RBAC protection
- Timeout checker framework (placeholder)

Frontend:
- Workflow page with 4 tabs (definitions, pending, completed, monitor)
- React Flow visual process designer (@xyflow/react)
- Process viewer with active node highlighting
- 3 API client modules for workflow endpoints
- Sidebar menu integration
2026-04-11 09:54:02 +08:00

17 lines
384 B
Rust

// erp-workflow: 工作流引擎模块 (Phase 4)
//
// 提供流程定义、流程实例管理、任务审批、Token 驱动执行引擎
// 和可视化流程设计器支持。
pub mod dto;
pub mod engine;
pub mod entity;
pub mod error;
pub mod handler;
pub mod module;
pub mod service;
pub mod workflow_state;
pub use module::WorkflowModule;
pub use workflow_state::WorkflowState;