feat(wfe-core): add output_data to ExecutionResult and register_step_factory to host
Core plumbing for YAML workflow support: - Add output_data field to ExecutionResult for step output capture - Executor merges output_data into workflow.data after step completion - Add register_step_factory(key, factory) to WorkflowHost for dynamic step registration by external crates like wfe-yaml
This commit is contained in:
@@ -201,6 +201,17 @@ impl WorkflowHost {
|
||||
sr.register::<S>();
|
||||
}
|
||||
|
||||
/// Register a step factory with an explicit key and factory function.
|
||||
/// Used by wfe-yaml and other dynamic step sources.
|
||||
pub async fn register_step_factory(
|
||||
&self,
|
||||
key: &str,
|
||||
factory: impl Fn() -> Box<dyn StepBody> + Send + Sync + 'static,
|
||||
) {
|
||||
let mut sr = self.step_registry.write().await;
|
||||
sr.register_factory(key, factory);
|
||||
}
|
||||
|
||||
/// Start a new workflow instance.
|
||||
#[tracing::instrument(
|
||||
name = "workflow.start",
|
||||
|
||||
Reference in New Issue
Block a user