dify/api/tests
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
..
fixtures/workflow feat: add flatten_output configuration to iteration node (#27502) 2025-10-27 16:04:24 +08:00
integration_tests improve opensearch index deletion #27231 (#27336) 2025-10-26 23:57:21 +08:00
test_containers_integration_tests feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122) 2025-11-12 17:00:02 +08:00
unit_tests feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122) 2025-11-12 17:00:02 +08:00
__init__.py Initial commit 2023-05-15 08:51:32 +08:00