Skip to main content

Node

Enum Node 

Source
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

§id: IdField

Unique identifier within this declaration category.

§next: IdField

Direct successor node ID.

§set_stage: Option<SetStage>

Optional business-stage assignment applied before this node executes.

§

End

Terminal node; invokes the completion hook and enqueues no successor.

Fields

§id: IdField

Unique identifier within this declaration category.

§set_stage: Option<SetStage>

Optional business-stage assignment applied before this node executes.

§

ServiceTask

Invokes a registered backend handler, then applies its outcome.

Fields

§id: IdField

Unique identifier within this declaration category.

§handler: IdField

Registry key of the host handler to invoke.

§args: Option<ContextMap>

Typed arguments passed unchanged to the registered handler.

§set_stage: Option<SetStage>

Optional business-stage assignment applied before this node executes.

§retries: Option<Retries>

Optional fixed-delay retry policy for failed service-task attempts.

§next: Option<Next>

Optional successor ID or ordered conditional routes after success.

§on_error: Option<OnError>

Error routing metadata; only service-task next is currently executed.

§

UserTask

Exposes a form through lifecycle hooks and waits for an accepted signal or timeout.

Fields

§id: IdField

Unique identifier within this declaration category.

§form: IdField

Declared form identifier passed to the form lifecycle hooks.

§wait_for: Option<WaitFor>

Signals accepted by this node; any one listed signal can complete the wait.

§set_stage: Option<SetStage>

Optional business-stage assignment applied before this node executes.

§timeout: Option<NodeTimeout>

Optional deadline whose event routes to on_timeout while this node is current.

§next: Option<Next>

Successor selected after an accepted signal updates the context.

§on_error: Option<OnError>

Reserved error routing metadata; parsed and validated but not executed.

§

Wait

Technical wait state. Unlike UserTask, it does not expose a form and does not invoke user-interface lifecycle handlers.

Fields

§id: IdField

Unique identifier within this declaration category.

§wait_for: WaitFor

Signal names accepted by this wait; any one completes it.

§timeout: Option<NodeTimeout>

Optional node deadline and the target to enqueue on expiration.

§next: Option<Next>

Optional direct successor or XOR routes after an accepted signal.

§set_stage: Option<SetStage>

Optional business-stage assignment applied before this node executes.

§

Gateway

Selects one successor according to the configured gateway rule.

Fields

§id: IdField

Unique identifier within this declaration category.

§set_stage: Option<SetStage>

Optional business-stage assignment applied before this node executes.

§gateway: GatewayKind

Branch selection rule; retain explicit gateway: XOR in definitions.

§branches: Vec<Branch>

Conditions evaluated in declaration order.

§next: Option<IdField>

Fallback target when no branch matches the gateway rule.

Implementations§

Source§

impl Node

Source

pub fn id(&self) -> &IdField

Returns the declared identifier.

Source

pub fn is_start(&self) -> bool

Returns whether this is the process entry node.

Source

pub fn is_end(&self) -> bool

Returns whether this is a terminal node.

Source

pub fn is_service_task(&self) -> bool

Returns whether this node invokes a backend handler.

Source

pub fn is_user_task(&self) -> bool

Returns whether this node exposes a form.

Source

pub fn set_stage(&self) -> Option<&SetStage>

Returns the optional stage assignment applied on node entry.

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Node

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Node

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V