web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Unanswered

Deleting Flow Sessions

(0) ShareShare
ReportReport
Posted on by 49
Hi,
 
A little background. I use Power Automate Desktop flows to automate business processes. When we first started using PowerAutomate a few years ago, we realized the size of the flowsessions table was starting to grow as we ran more and more desktop flows. To help keep the size of the table manageable, I setup a weekly Bulk Deletion job in Dynamics 365 to delete data from our flowsessions table where createdon is greater than 30 days. The job has been successfully for several years until this past week when it failed. Upon review, the issue is we can not delete data from 07/28 and moving forward. The data on 07/28 and later does not delete due to the following error: The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "flowsession_flowsession_parentdesktopflowrunid". 
 
I understand what this error means and that flowsessions can have a hierarchical relationship where one flowsession is the parent of another and I can not delete the record since their is one or many other child flowsessions that reference this session.
 
My question is why is this error only coming up now for data on 07/28 and moving forward? Was there an ON DELETE CASCADE statement that was removed? Prior to 07/28, the bulk deletion jobs would delete 700,000-800,000 records from flow sessions with no errors.
 
Any help on troubleshooting this error would be greatly appreciated.
 
Thanks
Categories:
I have the same question (6)
  • FB-21110010-0 Profile Picture
    2 on at
    Deleting Flow Sessions
    Has anyone been able to resolve this issue? I’m experiencing the same problem.
  • NM-28101329-0 Profile Picture
    2 on at
    Deleting Flow Sessions

    We are experiencing the exact same issue in our environment. FlowSession records created from the end of July onward can no longer be deleted and fail with the same parent/self-reference constraint error. Before this issue, all FlowSession records were removed correctly with the Bulk Delete Data Job, but now the newer ones remain stuck, preventing cleanup and causing the table and file storage to grow continuously.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 489 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 479 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 271

Last 30 days Overall leaderboard