fix(wfe-core): propagate step_name into execution pointers
Sets step_name on execution pointers when advancing to next steps, compensation steps, and parallel branch children so that runtime consumers can identify steps by name without lookup.
This commit is contained in:
@@ -293,7 +293,9 @@ impl WorkflowHost {
|
||||
// Create initial execution pointer for step 0 if the definition has steps.
|
||||
let mut instance = WorkflowInstance::new(definition_id, version, data);
|
||||
if !definition.steps.is_empty() {
|
||||
instance.execution_pointers.push(ExecutionPointer::new(0));
|
||||
let mut pointer = ExecutionPointer::new(0);
|
||||
pointer.step_name = definition.steps.first().and_then(|s| s.name.clone());
|
||||
instance.execution_pointers.push(pointer);
|
||||
}
|
||||
|
||||
// Persist the instance.
|
||||
|
||||
Reference in New Issue
Block a user