2013-04-01 1 views
0

워크 플로를 SharePoint 사이트에 배포 한 후 목록의 새 행을 만들어 워크 플로를 시작할 수 있습니다. 이들은 "진행중인 워크 플로 수"필드에도 반영됩니다. 그러나 작업 목록에서 특정 사용자 용으로 만든 작업을 찾을 수없는 것 같습니다.셰어 포인트 순차 워크 플로가 작업 목록에 추가되지 않음

쉐어 포인트 개발의 초보자로서 나는 무엇이 잘못되었는지 정확히 알지 못합니다. 친절하게 조언 해주십시오.

+0

더 적절한 장소에서 SharePoint에 대한 질문은 http://sharepoint.stackexchange.com/입니다) – jjczopek

답변

0

이 내 테스트 코드입니다 :

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; 
    } 
+0

고마워. 코드 문제가 아닙니다. 그것의 속성 설정 문제. (: –

관련 문제