I have a SharePoint Designer workflow on a list that is set up to start automatically when a list item is Created and Changed.
The workflow consists of:
Nine (9) "Set" actions to set the value of fields in the current item to the values in other fields in the current item
An "If" that does a "Set" action to set the value of a field in the current item to another field in the current item based on a condition
An "If" that does three (3) "Set" actions to set the value of a field in the current item to the value of another field based on a condition
(I have to do these things because of the SharePoint insanity of not allowing calculated fields to be used in totals in views, and not allowing BCS fields to be used in certain things in views, so I have to copy the calculated and BCS values to Number and Text fields.)
Anyway, sometimes this workflow runs in less than a minute - when I look at the workflow history, the start and end time is the same hour and minute.
Other times, and not infrequently, the end time for the workflow is 3, 4, or even 5 hours after the start time.
This is seemingly a simple workflow. As far as I can tell, we do not have any performance issues on our farm (consisting of two WFE's, two app servers, and one SQL server). Any ideas why it might take so long for this workflow to run?