0
將工作流程部署到SharePoint站點後,我可以通過創建列表的新行來啓動工作流程。這些也反映在「正在進行的工作流程的編號」字段中。但是,我似乎無法找到任務列表中爲特定用戶創建的任務。Sharepoint順序工作流程不將任務添加到任務列表中
作爲Sharepoint開發的初學者,我不完全確定哪裏出了問題。請提供建議。
將工作流程部署到SharePoint站點後,我可以通過創建列表的新行來啓動工作流程。這些也反映在「正在進行的工作流程的編號」字段中。但是,我似乎無法找到任務列表中爲特定用戶創建的任務。Sharepoint順序工作流程不將任務添加到任務列表中
作爲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問題是http://sharepoint.stackexchange.com/;) – jjczopek