1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Client for starting and controlling workflows on the ORCHER orchestrator.
//!
//! A [`Client`] starts workflow executions and returns a [`WorkflowHandle`] for
//! each one. Through a handle you wait for the result, send events, run queries,
//! and cancel or terminate the workflow.
//!
//! ## Example
//!
//! ```rust,no_run
//! use orcher_sdk::prelude::*;
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! // Connect to the server
//! let client = Client::connect("http://localhost:50051").await?;
//!
//! // Start a workflow
//! let handle = client
//! .start_workflow("OrderWorkflow", "order-123")
//! .await?;
//!
//! // Wait for result
//! let result: String = handle.result().await?;
//! println!("Order result: {}", result);
//!
//! // Send an event to a running workflow
//! handle.send_event("approve", "approved").await?;
//!
//! // Query workflow state
//! let status: String = handle.query("getStatus", ()).await?;
//!
//! Ok(())
//! }
//! ```
//!
//! ## ORCHER Terminology
//!
//! - **Event**: Asynchronous message sent to a workflow
//! - **Query**: Synchronous read of workflow state
//! - **Worker**: Process that executes workflows and tasks
pub use ;
pub use WorkflowHandle;
pub use ;