I had this exception start occurring on a workflow I was testing earlier. It was very strange – I’d already run through the workflow step at which this was happening successfully 3 times. Then I started to receive this error, consistently, at the same point of my unchanged workflow each time I ran it.
This task is currently locked by a running workflow and cannot be edited.
Normally, this error occurs if you try and complete a task twice – once as normal, and then a second time quickly afterwards, before the workflow engine has a chance to catch up. Usually, if you wait a moment, the first completion of the activity eventually happens and the workflow will continue. That didn’t seem to be the case here, though.
The point at which this happened actually a parallel activity containing two ‘review’ steps:
Naturally, I thought maybe I’d tried to ‘complete’ the workflow activities too quickly and somehow deadlocked the workflow, so I terminated the running workflow and restarted. When I tried again, this time carefully only completing the task once only, the issue continued. It didn’t matter which of the parallel tasks I’d try and complete – on the first ‘OK’ of the task, it would close the task and look like it was completing it, but not do so, and clicking OK a second time would cause the error. If I just waited, the task would never appear completed.
I did find some documentation on Nintex communities about this – but none of the causes mentioned seem to apply in my case.
In the end, I tried the IT move of desperation, and restarted my server. (Yup, I turned it off and on again). I then terminated my workflow yet again, and tried once more. And it worked; the workflow progressed past this step without issue. 3 times so far.
I have no idea what caused this problem, and no idea why restarting the server should fix it, but so far, it looks promising. It’s a strange issue, and I was starting to get desperate.