Coordinate hierarchical workflows with child calls
mainThe Call Module supports structured, multi-level coordination through parent-child relationships. This allows for complex workflows where a single root call can trigger multiple batches of child calls.
Coordination Rules
- Sequential Batches: A new batch (Batch N+1) cannot begin until the previous batch (Batch N) is complete.
- Parallel Children: All calls within a single batch can execute concurrently.
- FIFO Destruction: Child calls must be destroyed in the exact order they were created (First-In, First-Out).
- Completion Propagation: A parent call cannot reach the
Completedstate until all of its children have been destroyed.
Workflow Example Structure
Root Call (A→B)
├── Batch 1 (nonce=1)
│ ├── Child Call 1 (B→C) [parallel execution]
│ └── Child Call 2 (B→D) [parallel execution]
├── Batch 2 (nonce=2) [sequential after Batch 1]
│ └── Child Call 3 (B→E)