pub trait TaskKind:
Send
+ Sync
+ 'static {
// Required method
fn kind_name(&self) -> &'static str;
// Provided methods
fn verbose_name(&self) -> &'static str { ... }
fn on_assign(&self, _ctx: &AssignedTask<'_>) -> AssignOutcome { ... }
}Expand description
One pluggable workflow task behavior. Defaults make the trait
minimal to implement — only Self::kind_name is required;
the rest opt in.
Required Methods§
Provided Methods§
Sourcefn verbose_name(&self) -> &'static str
fn verbose_name(&self) -> &'static str
Human-readable label for the workflow task editor’s “Kind”
dropdown. Defaults to Self::kind_name.
Sourcefn on_assign(&self, _ctx: &AssignedTask<'_>) -> AssignOutcome
fn on_assign(&self, _ctx: &AssignedTask<'_>) -> AssignOutcome
Called when this task becomes the workflow’s current step. Side-effects (firing webhooks, recording metrics) belong here.
The default implementation returns WaitForHuman — i.e. the
task behaves like the canonical group_approval kind.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".