0

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!!

0

You can use these practices to ensure the workflow runs once, and stops after one instance -

  • Use the "Stop workflow" parameter to complete the workflow instance once it runs successfully.
  • Use a flag (create a new field) to mark and close once the workflow runs successfully and text file is generated for the day. The workflow should always check for this flag before running. This will help avoid duplicate runs.
  • Ensure that the workflow does not re-triggers itself after every item update. Use proper flags (fields) to check that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.