실행중인 워크 플로 내에서 워크 플로를 시작하기위한 적절한 방법은 무엇입니까?상태 워크 플로 내에서 순차 워크 플로 시작
현재 Visual Studio 2010을 사용하고 있으며 워크 플로는 Sharepoint 2010입니다. 이전에는이 워크 플로가 Sharepoint 2007에서 문제없이 작동했습니다. 패키지를 2010으로 마이그레이션 한 후 상태 워크 플로가 정상적으로 실행되지만 순차 워크 플로가 제대로 시작되지 않습니다. 순차가 수동으로 시작되면 정상적으로 실행됩니다.
다음은 상태 내에서 순차를 호출하는 데 사용하는 코드입니다.
// Starts CAB Implementation Workflow.
SPWorkflowManager wfManager = this.workflowProperties.Site.WorkflowManager;
SPWorkflowAssociationCollection associationCol = this.workflowProperties.List.WorkflowAssociations;
foreach (SPWorkflowAssociation association in associationCol)
{
// Replace {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} with the Id of the workflow you want to invoke
if (association.BaseId.ToString("B").Equals("{af0775b9-8f10-468d-9201-792a4f539c03}"))
{
wfManager.StartWorkflow(this.workflowProperties.Item, association, "", true);
break;
}
}
글자가 아닌 guid를 더 잘 배웁니다. association.BaseId == new Guid ("{af0775b9-8f10-468d-9201-792a4f539c03}") –