diff --git a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx index d7e7a1aa..393bd007 100644 --- a/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx +++ b/skyvern-frontend/src/routes/workflows/debugger/Debugger.tsx @@ -64,6 +64,7 @@ function Debugger() { useScriptCache: workflow.generate_script, scriptCacheKey: workflow.cache_key, aiFallback: workflow.ai_fallback ?? true, + runSequentially: workflow.run_sequentially ?? false, }; const elements = getElements( diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx index 87678e1a..2ac522f4 100644 --- a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx @@ -65,6 +65,7 @@ function WorkflowEditor() { useScriptCache: workflow.generate_script, scriptCacheKey: workflow.cache_key, aiFallback: workflow.ai_fallback ?? true, + runSequentially: workflow.run_sequentially ?? false, }; const elements = getElements( diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx index f63a0a38..2e482677 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/StartNode.tsx @@ -75,6 +75,7 @@ function StartNode({ id, data }: NodeProps) { useScriptCache: data.withWorkflowSettings ? data.useScriptCache : false, scriptCacheKey: data.withWorkflowSettings ? data.scriptCacheKey : null, aiFallback: data.withWorkflowSettings ? data.aiFallback : true, + runSequentially: data.withWorkflowSettings ? data.runSequentially : false, }); const [facing, setFacing] = useState<"front" | "back">("front"); @@ -254,6 +255,19 @@ function StartNode({ id, data }: NodeProps) { )} +
+
+ + + { + handleChange("runSequentially", value); + }} + /> +
+
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/types.ts b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/types.ts index dc4b17ee..19115af3 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/types.ts +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/StartNode/types.ts @@ -15,6 +15,7 @@ export type WorkflowStartNodeData = { useScriptCache: boolean; scriptCacheKey: string | null; aiFallback: boolean; + runSequentially: boolean; label: "__start_block__"; showCode: boolean; }; diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts index 2ca36e87..1d5d6214 100644 --- a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts +++ b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts @@ -708,6 +708,7 @@ function getElements( aiFallback: settings.aiFallback ?? true, label: "__start_block__", showCode: false, + runSequentially: settings.runSequentially, }), ); @@ -1418,6 +1419,7 @@ function getWorkflowSettings(nodes: Array): WorkflowSettings { useScriptCache: false, scriptCacheKey: null, aiFallback: true, + runSequentially: false, }; const startNodes = nodes.filter(isStartNode); const startNodeWithWorkflowSettings = startNodes.find( @@ -1438,6 +1440,7 @@ function getWorkflowSettings(nodes: Array): WorkflowSettings { useScriptCache: data.useScriptCache, scriptCacheKey: data.scriptCacheKey, aiFallback: data.aiFallback, + runSequentially: data.runSequentially, }; } return defaultSettings; diff --git a/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts b/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts index 3f5e1aea..790fb0d3 100644 --- a/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts +++ b/skyvern-frontend/src/routes/workflows/types/workflowTypes.ts @@ -530,6 +530,7 @@ export type WorkflowApiResponse = { generate_script: boolean; cache_key: string | null; ai_fallback: boolean | null; + run_sequentially: boolean | null; }; export type WorkflowSettings = { @@ -542,6 +543,7 @@ export type WorkflowSettings = { useScriptCache: boolean; scriptCacheKey: string | null; aiFallback: boolean | null; + runSequentially: boolean; }; export type WorkflowModel = JsonObjectExtendable<{ model_name: string }>; diff --git a/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts b/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts index 72e0db9f..ee02c8b2 100644 --- a/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts +++ b/skyvern-frontend/src/routes/workflows/types/workflowYamlTypes.ts @@ -17,6 +17,7 @@ export type WorkflowCreateYAMLRequest = { generate_script?: boolean; cache_key?: string | null; ai_fallback?: boolean; + run_sequentially?: boolean; }; export type WorkflowDefinitionYAML = { diff --git a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts index 991a5af2..c1064df4 100644 --- a/skyvern-frontend/src/store/WorkflowHasChangesStore.ts +++ b/skyvern-frontend/src/store/WorkflowHasChangesStore.ts @@ -122,6 +122,7 @@ const useWorkflowSave = () => { blocks: saveData.blocks, }, is_saved_task: saveData.workflow.is_saved_task, + run_sequentially: saveData.settings.runSequentially, }; const yaml = convertToYAML(requestBody);