SharePoint Development Bookmark and Share   
 index > SharePoint - Workflow > Does AlterTask work consistently?
 

Does AlterTask work consistently?

I have not yet used the functionality of .AlterTask or know the exact syntax, but what I want to do, in my OnTaskChanged event, is check a specific afterPropertie and then if the value is set, change the .AssignedTo field on the task so that the task gets assigned to someone else.

I've been reading on the forum where lots of people seem to have inconsistency problems with using this functionality.

Is using AlterTask a good way to update the .AssignedTo field or is there a better way?
EM
Etowah_man  Saturday, August 22, 2009 1:35 AM
I'd recommend using the UpdateTask activity right after the OnTaskChanged instead of Altering the task from within OnTaskChanged .
I have had issues where the task would get locked whenever I tried to modify it within anything other activities within the life of a task before it gets completed.

Dennis Alzoubi
  • Marked As Answer byEtowah_man Monday, October 26, 2009 9:47 PM
  • Proposed As Answer byDennis Alzoubi Monday, October 26, 2009 2:52 PM
  •  
Dennis Alzoubi  Thursday, September 03, 2009 6:30 PM
I'd recommend using the UpdateTask activity right after the OnTaskChanged instead of Altering the task from within OnTaskChanged .
I have had issues where the task would get locked whenever I tried to modify it within anything other activities within the life of a task before it gets completed.

Dennis Alzoubi
  • Marked As Answer byEtowah_man Monday, October 26, 2009 9:47 PM
  • Proposed As Answer byDennis Alzoubi Monday, October 26, 2009 2:52 PM
  •  
Dennis Alzoubi  Thursday, September 03, 2009 6:30 PM
Sorry I lost track of this question.

Yes, you are correct, that's what I did (use the UpdateTask activity). However, what I was missing was the fact that the samples I found were using the AlterTask method inside of ASP.Net code behind, meaning that the task was being updated outside of the workflow. The problem I had was that I was trying to use this method inside of the WF code which isn't going to work because the WF has the item locked.

Thanks!
EM
Etowah_man  Monday, October 26, 2009 9:47 PM

You can use google to search for other answers

Custom Search

More Threads

• Sequential Workflow Completes Before Executing All Tasks
• Concatenate two fields into a variable
• Change workflow stages
• Using custom content types
• WSS 3.0 Workflow with ASP.NET Task Forms - How to read data in the onTaskChanged Event
• Can CQWP only query Approved list item?
• Locating active workflows within a site
• Access Denied at clicking on title of the Task(Task List) and clicking on workflow column(Doc. Lib)
• Problem while loading Infopath, using task created by custom Workflow in VS
• Copying Document from a libary in another site to current site (using workflow)