[Iterator] Implement Backend for Iterator step (#14145)

Manually tested by starting to implement the frontend:
- loopStepIds contains a create record action that takes one item at a
time
- items to iterate are a list of string that will be used as record
title


https://github.com/user-attachments/assets/728310d9-4728-422f-a324-3783da24e517
This commit is contained in:
Thomas Trompette
2025-09-01 16:00:26 +02:00
committed by GitHub
parent 22a200171e
commit 2af611e938
31 changed files with 1232 additions and 126 deletions
@@ -76,6 +76,15 @@ export class WorkflowSchemaWorkspaceService {
formFieldMetadataItems: step.settings.input,
workspaceId,
});
case WorkflowActionType.ITERATOR: {
return {
nextItemToProcess: {
isLeaf: true,
type: 'unknown',
value: generateFakeValue('unknown'),
},
};
}
case WorkflowActionType.CODE: // StepOutput schema is computed on serverlessFunction draft execution
default:
return {};
@@ -654,6 +654,20 @@ export class WorkflowVersionStepWorkspaceService {
},
};
}
case WorkflowActionType.ITERATOR: {
return {
...baseStep,
name: 'Iterator',
type: WorkflowActionType.ITERATOR,
settings: {
...BASE_STEP_DEFINITION,
input: {
items: [],
initialLoopStepIds: [],
},
},
};
}
default:
throw new WorkflowVersionStepException(
`WorkflowActionType '${type}' unknown`,