C# Sharepoint顺序工作流未将任务添加到任务列表
将工作流部署到sharepoint网站后,我可以通过创建列表的新行来启动工作流。这些也反映在“正在进行的工作流程数量”字段中。但是,我似乎无法在任务列表中找到为特定用户创建的任务C# Sharepoint顺序工作流未将任务添加到任务列表,c#,sharepoint,workflow,C#,Sharepoint,Workflow,将工作流部署到sharepoint网站后,我可以通过创建列表的新行来启动工作流。这些也反映在“正在进行的工作流程数量”字段中。但是,我似乎无法在任务列表中找到为特定用户创建的任务 作为一名Sharepoint开发的初学者,我不太清楚到底出了什么问题。请告知。这是我经过测试的代码: private void OnCreateTask_MethodInvoking(object sender, EventArgs e) { taskId1 = Guid.NewGuid
作为一名Sharepoint开发的初学者,我不太清楚到底出了什么问题。请告知。这是我经过测试的代码:
private void OnCreateTask_MethodInvoking(object sender, EventArgs e)
{
taskId1 = Guid.NewGuid();
// SPContentTypeId myContentTypeId=new SPContentTypeId("0x01080100e73fd5f172cb40d8a5dca97fad7a58b8");
SPContentType myContentType = SPContext.Current.Web.ContentTypes["Powerfull Approval Workflow Task"];
CreateTaskApproval_ContentTypeID = myContentType.Id.ToString();
#region Enable ContentTypes
if (this.workflowProperties.TaskList.ContentTypesEnabled != true)
{
workflowProperties.TaskList.ContentTypesEnabled = true;
}
bool contenTypeExists = false;
foreach (SPContentType contentType in workflowProperties.TaskList.ContentTypes)
{
if (contentType.Name == myContentType.Name)
{
contenTypeExists = true;
break;
}
}
if (contenTypeExists != true)
{
workflowProperties.TaskList.ContentTypes.Add(myContentType);
}
myContentType.EditFormUrl = "_layouts/SequentialWorkflow/TaskEdit/TaskEditForm.aspx";
myContentType.DisplayFormUrl = "_layouts/SequentialWorkflow/TaskEdit/TaskEditForm.aspx";
myContentType.Update();
#endregion
taskProperties.PercentComplete = (float)0.0;
taskProperties.AssignedTo = myInstantiationData.User;
taskProperties.DueDate = myInstantiationData.DueDate;
taskProperties.Description = myInstantiationData.Request;
taskProperties.StartDate = DateTime.Now;
taskProperties.Title = "Please approve " + this.workflowProperties.Item.DisplayName;
}
有关SharePoint的问题更合适的位置是;)谢谢各位。这不是代码问题。这是一个属性设置问题。(: