I'm trying to get some traction on a problem that's turning my remaining non-gray hairs gray.
I have two lists, let's say for the sake of simplicity they are Accounts and Expenditures.
- Parent/child relationship between the lists; many expenditures for a single account.
- Users have permission to update expenditures, but can only read the account record.
- When an expenditure record is modified a workflow runs with impersonation to update the parent account record.
- Expenditure records can be edited in datasheet view...so a large number of records can be updated in a second; each update triggers a workflow that tries to update the account record.
- The workflows are intermittently throwing errors "the workflow could not update the item, possibly because one or more of the columns for the item require a different type of information" (the values being passed are fine as far as I can tell).
- I've isolated the update action by moving it off to a separate site workflow that is called by the list workflow (the list workflow never fails, it's the site workflow, that updates the Account record that fails now)
- If 5 records are updated, one may pass and four may fail; or three may pass and two will fail.
The problem seems to occur after some period of inactivity. When I first start troubleshooting, the problem occurs, but after I've updated a few records, the problem seems to go away. It's as if the problem occurs intermittently until an application pool comes online, at which point the problem goes away and I can't recreate it. But that's not exactly right, because I can have the problem occur during maybe a 5 minute period in which I've modified records several times. I also though for a while it might be a record-locking issue (with several child records all trying to update the same parent at once), but the fact is that after the first initial error period I can't get the thing to fail, and you would think if it was record locking it would be consistent.
The result is that my customer goes in to adjust the expenses a couple times a week, and every time gets one or more workflow error emails. I go in and may be able to reproduce the error once or twice and then it stops. My customer thinks I'm an idiot, and I'm not so sure he's wrong. It's like going into the kitchen, turning on the lights and watching the bugs scurry away.
Anyway, any help would be appreciated.