Task Properties in Task Form SaveData (This task is currently locked by a running workflow and cannot be edited)

Apr 16, 2009 at 3:06 AM

When saving your data in in the Task Form Save Data, if the property matches a Task field name an error will be thrown.

Ie, using the following code:
    protected override TaskData SaveData(object commandArgument)
    {
        TaskData data = new TaskData();
        data["DueDate"] = DateTime.Today.Date.AddDays(2).ToString("O");
        return data;
    }

you will get the following exception:
This task is currently locked by a running workflow and cannot be edited...

Just thought I would post it so no one else made the same mistake.

Coordinator
Apr 16, 2009 at 11:04 AM
Ill investigate this issue later. I think we should support modifying any task related field.

________________________________

Van: teggins [mailto:notifications@codeplex.com]
Verzonden: do 16-4-2009 5:06
Aan: Wouter van Vugt
Onderwerp: Task Properties in Task Form SaveData (This task is currently locked by a running workflow and ca... [wss3workflow:53451]



From: teggins

When saving your data in in the Task Form Save Data, if the property matches a Task field name an error will be thrown.

Ie, using the following code:
protected override TaskData SaveData(object commandArgument)
{
TaskData data = new TaskData();
data["DueDate"] = DateTime.Today.Date.AddDays(2).ToString("O");
return data;
}

you will get the following exception:
This task is currently locked by a running workflow and cannot be edited...

Just thought I would post it so no one else made the same mistake.

Read the full discussion online <http://wss3workflow.codeplex.com/Thread/View.aspx?ThreadId=53451&ANCHOR#Post179916> .

To add a post to this discussion, reply to this email ([email removed] <mailto:[email removed]?subject=[wss3workflow:53451]> )

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings <http://www.codeplex.com/site/discussions/project/unsubscribe/wss3workflow> on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Coordinator
Jun 8, 2009 at 11:08 AM

This issue is resolved in the 1.1 release

You can use code similar to:

         TaskData data = new TaskData();
        data[SPBuiltInFieldId.TaskDueDate] = DateTime.Now.AddDays(15);

to update default fields of a task.


Hope it helps