dify/api/core/app
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
..
app_config fix enum and type (#26756) 2025-10-11 17:46:44 +08:00
apps refactor: implement tenant self queue for rag tasks (#27559) 2025-11-06 21:25:50 +08:00
entities feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122) 2025-11-12 17:00:02 +08:00
features rm type ignore (#25715) 2025-10-21 11:26:58 +08:00
layers feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122) 2025-11-12 17:00:02 +08:00
task_pipeline fix:knowledge base reference information is overwritten when using mu… (#27799) 2025-11-04 16:40:44 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00