dify/api/core/app/entities
QuantumGhost fd255e81e1
feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122)
Certain metadata (including but not limited to `InvokeFrom`, `call_depth`, and `streaming`)  is required when resuming a paused workflow. However, these fields are not part of `GraphRuntimeState` and were not saved in the previous
 implementation of  `PauseStatePersistenceLayer`.

This commit addresses this limitation by introducing a `WorkflowResumptionContext` model that wraps both the `*GenerateEntity` and `GraphRuntimeState`. This approach provides:

- A structured container for all necessary resumption data
- Better separation of concerns between execution state and persistence
- Enhanced extensibility for future metadata additions
- Clearer naming that distinguishes from `GraphRuntimeState`

The `WorkflowResumptionContext` model makes extending the pause state easier while maintaining backward compatibility and proper version management for the entire execution state ecosystem.

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-12 17:00:02 +08:00
..
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
app_invoke_entities.py feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122) 2025-11-12 17:00:02 +08:00
queue_entities.py feat(graph_engine): Support pausing workflow graph executions (#26585) 2025-10-19 21:33:41 +08:00
rag_pipeline_invoke_entities.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
task_entities.py feat: enhance tencent trace integration with LLM core metrics (#27126) 2025-10-29 15:53:30 +08:00