I am new to SharePoint and I am currently working on SharePoint 2013. I am currently facing an issue with a workflow in 1 of our applications.
The workflow currently is a list workflow and works on a list which has over 10000+ records. The list workflow works on this list every night to create a text file daily which has different fields from each record concatenated into different rows in the text file and the header contains the date information for the specific day.
The issue here is the list workflow was designed to run and generate the daily extract text file whenever there is an update on any record in the list and there's an ID column which is updated to 1.
The infrastructure lead for SharePoint in our organization raised a concern that this list workflow keeps running and hence generates a lot of actions which are impacting the SharePoint database and he has to clear this actions logged very frequently.
We have modified the query in the list workflow to fetch only those records from the 10000+ records in the list which are actually required for further processing by our down-streams and have reduced the count of records processed to around 1500 (based on an expiry date criteria for the records in the list).
This has reduced the number of actions entered into SharePoint DB as per the infra lead but yet not up to the mark.
Our requirement is that the text file is generated daily and that the workflow should not keep running once the text file is generated for the day. We have tried converting the workflow to a site workflow but it kept failing due to the number of records that needed to be processed was large.
The current list workflow is triggered every night by a scheduler workflow and then keeps running whenever the condition ID=1 for an updated record comes up. I have also added a 1 day i.e. 24-hour pause in the list workflow after the extract is created, but the workflow still runs again when the condition of ID=1 occurs. Could you please suggest how this list workflow can be modified to run it only once daily and to not run further on the same day after the extract is generated?
Thank you in advance!!