I am attempting to pass information from a task created within a workflow to its corresponding task form. Prior to the CreateTask activity, I create an SPWorkflowTaskProperties and fill it with the usual info (title, assigned-to, etc). I also add some elements to the ExtendedProperties property. However, those custom properties never make it into the Task.
I've tried setting the property key to:
- the Guid of one of my task' content
type's fields; - the internal name of
one of my task' content type's
fields; - an unrelated name (in the
hopes of getting the info into the
task's properties instead of its
fields).
Nothing works. The task, once created, contains only the built-in field values I have set. None of values I explicitly added to the extended properties show up.
The (simplified) sequence of my activities is as follows:
- PrepareTask. This is a custom
activity that contains the
SPWorkflowTaskProperties - CreateTask. The task properties are bound to the one in the PrepareTask activity.
- OnTaskCreated. The task properties are bound to the one in the PrepareTask activity.
- While (task not complete)
- OnTaskChanged
I am using WSS 3.0 SP1 and an ASPX (NOT InfoPath) task form.
Best Solution
I still don't know why my original solution didn't work. But I have found a workaround. My sequence of activities is now:
So I have to create the task, then immediately poke values into it and update.
I hope this will help some future reader of this question.