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.
Sourcepub fn timeout(&self) -> Option<&NodeTimeout>
pub fn timeout(&self) -> Option<&NodeTimeout>
Returns the deadline configured for a waiting node, if any.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for Node
impl Freeze for Node
impl Move for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
Source§fn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
submit event.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more