Use variables within Iterators (#14604)

Variables were not working properly. Output schema was outdated and
parent steps were not calculated properly.

Before


https://github.com/user-attachments/assets/b070c1ff-41dd-4ea0-a590-25bb39027456

After


https://github.com/user-attachments/assets/baa43e69-0e7c-4697-8812-3ce523efba13
This commit is contained in:
Thomas Trompette
2025-09-18 23:13:57 +02:00
committed by GitHub
parent c7005db860
commit 6d5635f4e2
5 changed files with 253 additions and 110 deletions
@@ -25,9 +25,10 @@ export const useAvailableVariablesInWorkflowStep = ({
);
const flow = useFlowOrThrow();
const steps = flow.steps ?? [];
const currentStep = steps.find((step) => step.id === workflowSelectedNode);
const previousStepIds: string[] = isDefined(workflowSelectedNode)
? getPreviousSteps(steps, workflowSelectedNode).map((step) => step.id)
const previousStepIds: string[] = isDefined(currentStep)
? getPreviousSteps({ steps, currentStep }).map((step) => step.id)
: [];
const availableStepsOutputSchema: StepOutputSchemaV2[] = useRecoilValue(