locked
Task Currenty Locked by another workflow RRS feed

  • Question

  • I am quite truly stumped here on how to fix this.  Here's my scenario and the things I've tried.

    Scenario:

    Developed a solution using multiple lists and SPD 2007 workflows.  People submit items and they go through a multi step process that involves the creation of several different tasks.  When a task is created, it triggers a secondary workflow that FIRST pauses for 3 minutes (actuality its more like 5-7) and then executes to prevent locking.  The secondary workflow gets, depending on the content type of the task, relevant details from the original item and puts them into the task for the necessary people to see. (Comments, requests, changes, etc).

    Everything was working fine, and then all of a sudden everything stopped.  Now if you go into any task, and fill it out and hit "Complete Task" you get the error "This task is currently locked by another process or workflow".  And this is true of all tasks in the list.  Also this is happening after the secondary workflow is completed.

    Things I've tried:

    1.)  I checked and there is only 1 instance of the secondary workflow on the task list, so it can't be a case of multiple instances of a workflow locking a single item.

    2.)  I've up-ed the throttle on the site from 15 to 150.  Because I noticed we hit 60 entries in the primary list when the issue started to appear.

    3.)  We can't be exceeding the total number for the list cause there are a total of 44 tasks in the task list.

    I also noticed someone say in a form that the status of "Not Started" causing the problem.  so my secondary workflow sets the task to "in-progress"

    Any thoughts would be helpful here, I'm really stuck and this took down production so I need to get it fixed ASAP.  I did notice one thing that's frustrating,  I was trying to see if multiple instances of a workflow are running, and on the task items, when you go to "View Item" there's no way to see a list of the workflows like on a custom list.  Anybody have any idea how I can see this list for the task.

    Friday, August 12, 2011 3:21 PM

Answers

  • Hi, I encounter this all the time in both sp2007 and sp2010, and have learned that basically if you're using those task actions in one workflow, you CAN'T have a workflow that runs on the task list.  It is simply not reliable.  Very frustrating, I know.

    One way I've used to get around this is to NOT use any of the three "task actions" in the workflow.  I use "create list item" action, and set it to create a new item in the tasks list.  It's a lot more work, but it lets you avoid the problem you're having.  This way, you'll also be able to set any task field values that you want to, right there when creating the item, as opposed to having the need to create a secondary workflow on the tasks list.


    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura
    Beginning SharePoint 2010: Building Business Solutions with SharePoint
    • Marked as answer by KmackGFNet Monday, August 22, 2011 12:41 PM
    Sunday, August 21, 2011 4:29 PM

All replies

  • Hi,

    Could you check if you have setup the correlation and task ids correctly. Make sure that there is no confusion on that.  This could be one of the possibilities.

    Hope it helps.

    Regards

    Ranga


    Regards Ranga www.sharepointfrontier.com
    Wednesday, August 17, 2011 2:19 PM
  • Hey Ranga,

    Thanks for the tip, I checked that and the task is showing up as being connected to the workflow.  We set the throttle up to 500, and I know there aren't that many items with workflows running, because to be honest this is the only list on the entire site with a workflow on it.  But when I remove the secondary workflow and try it I get this behavior.

    I can go in, and hit complete task, and after I do, nothing.  The workflow doesn't advance, and if I try to go back into the task, its Locked by another process or workflow.  Its almost like its trying to complete it but hanging.  Our admin tells me there's nothing in the event logs.

    Any thoughts?

    Thanks,

    Wednesday, August 17, 2011 5:43 PM
  • Hello KmackGFNet,

     

    I've encountered an issue similar to this in my own virtual machine environment. I've found that this error is often caused by old timer jobs in SharePoint. This can be remedied by clearing the SharePoint configuration cache.

     

    This MSDN article  shows the step by step process for clearing the cache.

     

    http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx

     

    As for your second question, there really isn't a simple way to view what workflows are active on a list. But it is possible to view the workflows currently active in your site collection as a whole. On your root site go to Site Actions > Site Settings > Modify All Site Settings > Site Collection Workflows.

     

    You can also view active workflow timer jobs by going to Central Administration > Operations > Timer Job Definitions, Timer Job Status ...this could show any active timer jobs that could be causing your problem.

     

    Finally there is another forum that shows how to create a web part that will show exactly what workflows are active on which lists. Follow the URL below.

     

    http://social.msdn.microsoft.com/Forums/en-SG/sharepointworkflow/thread/1E06BB00-1739-46A7-BC18-1D2EC3C00A10

     

    Thanks,

    Manas

    Thursday, August 18, 2011 4:14 AM
  • Great idea, and I went and followed the steps on the page for clearing the timer cache.  It didn't work.  After we did the clearing of the class the same problem still continues to happen.  Its even more bizarre because its only happening on this site.  On this one site, if you go to any workflow and click to complete a task, the workflow hangs, and if you try to go back and edit the task, you get an error saying "locked by another workflow or process."

    I and the administrator of our sharepoint site have been searching for a solution to this problem, for over a week with no luck, any help would be greatly appreciated.

    Thanks,

    Thursday, August 18, 2011 5:59 PM
  • HI,

    Have you tried stopping the current workflow instances and then initiating them again?

     


    Thanks, Rahul Rashu
    Sunday, August 21, 2011 3:03 PM
  • Hi, I encounter this all the time in both sp2007 and sp2010, and have learned that basically if you're using those task actions in one workflow, you CAN'T have a workflow that runs on the task list.  It is simply not reliable.  Very frustrating, I know.

    One way I've used to get around this is to NOT use any of the three "task actions" in the workflow.  I use "create list item" action, and set it to create a new item in the tasks list.  It's a lot more work, but it lets you avoid the problem you're having.  This way, you'll also be able to set any task field values that you want to, right there when creating the item, as opposed to having the need to create a secondary workflow on the tasks list.


    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura
    Beginning SharePoint 2010: Building Business Solutions with SharePoint
    • Marked as answer by KmackGFNet Monday, August 22, 2011 12:41 PM
    Sunday, August 21, 2011 4:29 PM
  • Yes, I stopped all current workflow instances and re-initiated them.
    Monday, August 22, 2011 12:04 PM
  • Your solution definitely looks do-able, and as much as I hate to re-write huge sections of my workflow, production has been down for far too long.  I did have a question though.  Right now, this workflow involves 6 different task step processes (task created, they do what they need to, they mark task completed, and workflow moves on), and each of the task forms is very customized.  There are different fields showing, and I've even made customizations where they would be able to have links etc. 

    I assume I would do this with content types would probably be the best option and then create separate editform.aspx files for each content type.  Your right it will be a lot of work but its kind of my only option.

    Thanks,

    Monday, August 22, 2011 12:41 PM