locked
Sharepoint 2007 task workflow task locked error. RRS feed

  • Question

  • Hi.. i did a search and found some ideas but its not helping.
    We run SP 2007 SP3 on two machines. We run a lot of workflows on many sites and have been doing this for more than 3 years without any major issues. I have been updating the workflows without quiqueing the farm and that usually works. However i think that i might not have gotten away with it this time. The other week we started getting a lot of "this task is locked" when people try to approve a task. It seems very random and it happens on random libraries at random times. I have yet to be able to find a common thread as to why it happens. If we terminate and restart the workflow on a specific item it works fine. These workflows are basic ones created in designer with some approvals attached. looking at the logs the only thing they say is that the task is locked.. nothing else. There is only one workflow per list its attached to.
    I think that this is the issue that we are having. The issue is to get out of it... 

    Thsi is what we have tried...
    1. Create a new task list and reaccossiate the workflow to it.
    2. At a pause in the workflow
    3. Restart the servers
    4. Delete and republish the workflow
    5. Run powershell script to unlock locked tasks as per below. It found no tasks to unlock
    6. Clean out the timer and config cache
    7. I have changed the workflow throttle setting from 5 to 25
    8. I have NOT changed the workflow timer job to run more often
    Now that's what i have done so far. I have come to a point where i have no more ideas and my manager wonders what is going on :-). Does anyone have any ideas as to wht to try next>????
    Poweshell script....
    Unlock running tasks
    ################################################################################################
    [system.reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")
    ### Begin Variables ###
    $siteUrl=Read-Host `n`n"Type the url for the web you wish to unlock workflows"`n
    ### End Variables ###
    $site=new-object Microsoft.SharePoint.SPSite($siteUrl)
    $web=$site.OpenWeb()
    $web.url
    $i=0
    foreach($list in $web.lists){
        foreach($item in $list.items | where {$_[[Microsoft.SharePoint.SPBuiltInFieldId]::WorkFlowVersion] -ne 1}){
         
                if($item["Status"] -eq "In Progress")
                {
                      Try
                      {
                            Write-Host `n`nUnlocking workflow on $item.name
                            $item[[Microsoft.SharePoint.SPBuiltInFieldId]::WorkFlowVersion]=1;                 
                            $item.SystemUpdate()
                            $i++
                      }
                      Catch [System.Exception]
                      {
                            Write-Host Caught error trying to unlock workflow -ForegroundColor Red
                      }
                }          
          }
    }
    Write-Host `n`nUnlocked $i workflows within $web.url
    $web.dispose()
    $site.dispose()
    ##############################################################################################


    • Edited by drnibbles Tuesday, January 17, 2012 9:19 PM
    Tuesday, January 17, 2012 3:22 AM

Answers

  • Well it has been sorted. We are using Nintex workflow engine and at first glance it didn't look like it was their issue. However after more investigation it was actually a design flaw in one of my workflows which seems to have come to a critical point with the last Nintex update. I was using an old feature with some added smarts which is not an out of the box feature. So once i changed my 3yr old handy hack and used the proper feature which is now added as a OOB feature the issue went away.

    About 3yrs ago i use a feature in Nintex called an approval however it didn't have a built in feature to send reminders. This was built in manually around the feature and has been working fine. However it seems that something somehow did fail when we updated to the latest version of Nintex and my old workflow would not run correctly. But once we found the issue and then rejogged the workflow to use a newer OOB approval feature the issue went away. It was some interesting times but now its all back and working as it should. 

    Regards

    Joel

    Tuesday, January 31, 2012 11:10 PM

All replies

  • Hello drnibbles,

     

    Thank you for your question.

     

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

     

    Thank you for your understanding and support.

     

    Thanks,

    Wayne Fan

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact  tnmff@microsoft.com.


    Wayne Fan

    TechNet Community Support

    Wednesday, January 18, 2012 2:40 AM
  • Hi

    Thank you. I have now cleaned a library of all workflows so the library has none attached. When i did that the strange thing was that once the workflow was deleted i went back to any item in the list and it still showed the last workflow as running on the item. So altho i deleted the workflow from the library it was still showing as running on items. I thought that if one deletes the workflow from the library all running workflows will end up as cancelled and empty.

    Anyway this issue happens randomly on items all across the farm still :-)

    Wednesday, January 18, 2012 4:42 AM
  • Hello drnibbles,

     

    Thank you for your forum post. I have reviewed your post and see that you're getting tasks locked randomly in SharePoint.

     

    The current tasks that are locked can only be unlocked via object model coding.

     

    As for trying to narrow down the issue I see you attempted changing the workflow throttle. Was this the stsadm -o setproperty -pn workflow-eventdelivery-throttle or the stsadm -o setproperty -pn workitem-eventdelivery-throttle?

     

    Also I would like to find out what version of .net framework you are currently running.

     

    Please provide us with the following answers that would be great.

    Regards,

    Jing Wang | Microsoft Online Community Support
    Tuesday, January 24, 2012 10:08 PM
  • Well it has been sorted. We are using Nintex workflow engine and at first glance it didn't look like it was their issue. However after more investigation it was actually a design flaw in one of my workflows which seems to have come to a critical point with the last Nintex update. I was using an old feature with some added smarts which is not an out of the box feature. So once i changed my 3yr old handy hack and used the proper feature which is now added as a OOB feature the issue went away.

    About 3yrs ago i use a feature in Nintex called an approval however it didn't have a built in feature to send reminders. This was built in manually around the feature and has been working fine. However it seems that something somehow did fail when we updated to the latest version of Nintex and my old workflow would not run correctly. But once we found the issue and then rejogged the workflow to use a newer OOB approval feature the issue went away. It was some interesting times but now its all back and working as it should. 

    Regards

    Joel

    Tuesday, January 31, 2012 11:10 PM
  • Hi Jing,

            i am deploying my sequential visual studio workflows to client server. All are works fine.

    But some times it will not move one level to another,  it will struck, i dont know how this happens, now facing really big challenge here.

    I spent more 10 hours to fix this. but no luck.

    i am really wondering why it's not fire taskchanged activity after approver/rejected in infopath task form(some times).

             i got the solution but i don't know is the correct way or not. the same issue is exists in my QA server also at one of approval level.

     I spent more time but no luck. finally i change the form library, create a new one . wow.. now its work in QA. i am surprise why this happen.

    but is not the correct way in client location to solve the issue. 

    Please tell me how to solve this issue asap.

    thanks in advance,

    Nagendrarao.


    Wednesday, April 25, 2012 5:57 AM