fix: update progress callback and event types for workflow execution
- Changed progress callback from "execution_complete" to "workflow_graph_finished" to provide intermediate updates. - Updated documentation to clarify the distinction between "workflow_graph_finished" and "execution_complete". - Adjusted frontend API handling to accommodate new event structure and ensure proper result serialization.
This commit is contained in:
1 parent
a002781ef9
commit
0ad3ddd627
3 files changed
+30
-14
No files matched your search
+10
-11
@@ -512,18 +512,17 @@ export const api = {
|
||||
onProgress(data)
|
||||
}
|
||||
|
||||
// Check for final result
|
||||
// Check for final result (/execute-stream liefert volles POST-/execute-Payload unter result)
|
||||
if (data.type === 'execution_complete') {
|
||||
// Transform SSE result to match regular execute format
|
||||
finalResult = {
|
||||
type: 'workflow',
|
||||
execution_id: data.execution_id,
|
||||
status: data.status,
|
||||
aggregated_result: data.aggregated_result,
|
||||
debug: {
|
||||
node_states: [] // TODO: collect from progress events if needed
|
||||
}
|
||||
}
|
||||
finalResult = data.result
|
||||
? data.result
|
||||
: {
|
||||
type: 'workflow',
|
||||
execution_id: data.execution_id,
|
||||
status: data.status,
|
||||
aggregated_result: data.aggregated_result,
|
||||
debug: { node_states: [] },
|
||||
}
|
||||
eventSource.close()
|
||||
resolve(finalResult)
|
||||
} else if (data.type === 'execution_failed') {
|
||||
|
||||
Reference in new issue
Block a user