### Engine Enhancement, Optimize Task Claiming and SQL Construction **Description** - Investigated task claiming behavior within the integration engine and identified an edge case preventing stale task recovery when IsRunningSince was NULL. - Enhanced lock acquisition logic to correctly reclaim orphaned tasks and improve scheduler reliability. - Refactored SQL query construction by replacing legacy StringBuilder-based statements with modern raw string literals for improved readability and maintainability. - Performed validation and regression testing to verify task execution, lock recovery, and overall engine stability. **JIRA** - No Jira Issue Linked! **Author** - Najib El-Husseini **Type** - Bug **Date** - 2026-11-11 **Implementation Hours** - 1.5 ---