pub enum Node {
Start {
id: IdField,
next: IdField,
set_stage: Option<SetStage>,
},
End {
id: IdField,
set_stage: Option<SetStage>,
},
ServiceTask {
id: IdField,
handler: IdField,
args: Option<ContextMap>,
set_stage: Option<SetStage>,
retries: Option<Retries>,
next: Option<Next>,
on_error: Option<OnError>,
},
UserTask {
id: IdField,
form: IdField,
wait_for: Option<WaitFor>,
set_stage: Option<SetStage>,
timeout: Option<NodeTimeout>,
next: Option<Next>,
on_error: Option<OnError>,
},
Wait {
id: IdField,
wait_for: WaitFor,
timeout: Option<NodeTimeout>,
next: Option<Next>,
set_stage: Option<SetStage>,
},
Gateway {
id: IdField,
set_stage: Option<SetStage>,
gateway: GatewayKind,
branches: Vec<Branch>,
next: Option<IdField>,
},
}Expand description
An executable workflow node selected by the case-sensitive type field.
Variants§
Start
The unique process entry node; immediately enqueues its successor.
Fields
End
Terminal node; invokes the completion hook and enqueues no successor.
Fields
ServiceTask
Invokes a registered backend handler, then applies its outcome.
Fields
args: Option<ContextMap>Typed arguments passed unchanged to the registered handler.
UserTask
Exposes a form through lifecycle hooks and waits for an accepted signal or timeout.
Fields
wait_for: Option<WaitFor>Signals accepted by this node; any one listed signal can complete the wait.
timeout: Option<NodeTimeout>Optional deadline whose event routes to on_timeout while this node is current.
Wait
Technical wait state. Unlike UserTask, it does not expose a form and
does not invoke user-interface lifecycle handlers.
Fields
timeout: Option<NodeTimeout>Optional node deadline and the target to enqueue on expiration.
Gateway
Selects one successor according to the configured gateway rule.
Fields
gateway: GatewayKindBranch selection rule; retain explicit gateway: XOR in definitions.
Implementations§
Source§impl Node
impl Node
Sourcepub fn is_service_task(&self) -> bool
pub fn is_service_task(&self) -> bool
Returns whether this node invokes a backend handler.
Sourcepub fn is_user_task(&self) -> bool
pub fn is_user_task(&self) -> bool
Returns whether this node exposes a form.