pub fn chain_root(run: &Run) -> Option<Uuid>Expand description
The root run of the chain a sub-workflow child run belongs to.
Resuming a child resumes this root instead: the root replays its steps
and re-enters the same child run through its open Workflow step. The
worker uses it to follow its lease from a child to the root it resumed.
None when run is not a sub-workflow child run.
ยงExamples
use ironflow_engine::engine::chain_root;
use ironflow_store::entities::Run;
use uuid::Uuid;
fn lease_target(run: &Run) -> Uuid {
chain_root(run).unwrap_or(run.id)
}