@@ -1288,6 +1288,13 @@ export function useWorkflowExecution() {
12881288 onBlockCompleteCallback : onBlockComplete ,
12891289 } )
12901290
1291+ const clientWorkflowState = executionWorkflowState || {
1292+ blocks : filteredStates ,
1293+ edges : workflowEdges ,
1294+ loops : latestWorkflowState . loops ,
1295+ parallels : latestWorkflowState . parallels ,
1296+ }
1297+
12911298 await executionStream . execute ( {
12921299 workflowId : activeWorkflowId ,
12931300 input : finalWorkflowInput ,
@@ -1297,14 +1304,12 @@ export function useWorkflowExecution() {
12971304 useDraftState : true ,
12981305 isClientSession : true ,
12991306 stopAfterBlockId,
1300- workflowStateOverride : executionWorkflowState
1301- ? {
1302- blocks : executionWorkflowState . blocks ,
1303- edges : executionWorkflowState . edges ,
1304- loops : executionWorkflowState . loops ,
1305- parallels : executionWorkflowState . parallels ,
1306- }
1307- : undefined ,
1307+ workflowStateOverride : {
1308+ blocks : clientWorkflowState . blocks ,
1309+ edges : clientWorkflowState . edges ,
1310+ loops : clientWorkflowState . loops ,
1311+ parallels : clientWorkflowState . parallels ,
1312+ } ,
13081313 callbacks : {
13091314 onExecutionStarted : ( data ) => {
13101315 logger . info ( 'Server execution started:' , data )
0 commit comments