pub trait Activity: Send + Sync {
// Required methods
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 mut ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<ActivityResult, ActivityError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn id(&self) -> &str;
fn name(&self) -> Option<&str>;
}Expand description
Activity Trait
Represents an executable activity in a BPMN process. Activities can be tasks, gateways, events, or other executable elements.
Required Methods§
Sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 mut ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<ActivityResult, ActivityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 mut ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<ActivityResult, ActivityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".