private void createTask1_MethodInvoking(object sender, EventArgs e) { createTask1.TaskId = Guid.NewGuid(); approvalTask_TaskProperties = new SPWorkflowTaskProperties();

        **approvalTask_TaskProperties.AssignedTo = workflowProperties.Web.SiteAdministrators[0].LoginName;**

        approvalTask_TaskProperties.DueDate = DateTime.Now.AddDays(1.0F);
        approvalTask_TaskProperties.Title = "Approval Required for " + twInfo.Title;
        approvalTask_TaskProperties.Description = "Specify the approval result here .";
        createTask1.TaskProperties = approvalTask_TaskProperties;

In the highlighted line I have a problem, It gets Value cannot be null. Parameter name: uriString

  • I fixed this by placing the following code. private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e) { XmlSerializer serializer = new XmlSerializer(typeof(TrainingInfo)); XmlTextReader reader = new XmlTextReader(new System.IO.StringReader(workflowProperties.InitiationData)); twInfo = (TrainingInfo)serializer.Deserialize(reader); createTrainingSiteName = twInfo.Code; createTrainingSiteUrl = workflowProperties.WebUrl; } however I get another error, the InitiationData is NULL] Any idea? Sep 3, 2010 at 3:07
  • sergeluca.spaces.live.com/blog/cns!E8A06D5F2F585013!972.entry - See step 7, I think that might help solve your issue.
    – James Love
    Sep 3, 2010 at 7:56
  • The problem was with the onworkflowactivated, it didnt have the properties well binded. Sep 3, 2010 at 15:54

1 Answer 1


The problem was with the onworkflowactivated, it didnt have the properties well binded, after I binded them, I got the initiationData not null

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.