bpmn_engine/lib.rs
1//! # BPMN Engine
2//!
3//! BPMN 2.0 execution engine for Rust.
4//!
5//! This crate provides a high-performance, type-safe BPMN 2.0 execution engine
6//! that supports BPMN 2.0 JSON format as standard I/O.
7//!
8//! ## Design Principles
9//!
10//! - **Activity/Capability-based design**: Following DoDAF v2 DM2 principles
11//! - **Type safety**: Leveraging Rust's type system
12//! - **Extensibility**: Support for custom tasks and listeners
13//! - **Future-ready**: Designed for GraphQL API and persistence layer integration
14//!
15//! ## Example
16//!
17//! ```no_run
18//! use bpmn_engine::{Engine, ProcessDefinition};
19//!
20//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
21//! let engine = Engine::new();
22//! let definition = ProcessDefinition::from_json(r#"
23//! {
24//! "id": "process1",
25//! "name": "Example Process",
26//! "elements": []
27//! }"#)?;
28//!
29//! let instance = engine.start_process(definition, None).await?;
30//! # Ok(())
31//! # }
32//! ```
33
34pub mod activity;
35pub mod capability;
36pub mod elements;
37pub mod engine;
38pub mod model;
39pub mod repository;
40
41pub use engine::{Engine, EngineBuilder, EngineError};
42pub use engine::instance::ProcessInstance;
43pub use engine::context::ExecutionContext;
44pub use model::ProcessDefinition;
45pub use activity::{Activity, ActivityError, ActivityResult, ProcessListener, ActivityFactory, DefaultActivityFactory};
46