* Catch exceptions and log instead of crashing
Modified both WorkflowInstance and WorkflowDefinition state loading to prevent throwing exceptions if the state fails to load successfully.
Also modified the CleanupJob to catch exceptions thrown by cleaning up and logging as errors and continuing instead of crashing.
Fixes 6473
* Use LogError instead of LogWarning for deserialization failure.
Updated the log level to LogError when workflow definition state deserialization fails. This change ensures better visibility and prioritization of critical issues during state handling.
---------
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Introduced a mechanism to identify and restart interrupted workflows. This includes a new `IWorkflowRestarter` contract, its default implementation, and a recurring task for handling restarts. Additionally, updated configurations and added extensions to improve workflow instance filtering and liveness tracking.
Deleted an unnecessary `using` directive and a debug `Console.WriteLine` call. These changes clean up the code, improve readability, and avoid potential clutter.
Replaced the CleanupHostedService with CleanupRecurringTask for better scheduling and simpler configuration. Converted several classes to use constructor-based dependency injection and streamlined some type assignments. Removed unneeded files and updated existing code to follow more concise conventions. This enhances maintainability and readability.