Here i comes to a requirement as part of some migrations.
I need to get all the list of worflows in site collections and need to differentiate the list of SPD workflows and OOTB workflows.
Reference for this post has taken from one of my friends blog
Thank you !!
I need to get all the list of worflows in site collections and need to differentiate the list of SPD workflows and OOTB workflows.
foreach (SPWorkflowAssociation workflowAssociation in workflowCollection) { string WorkflowType = string.Empty; if (workflowAssociation.BaseTemplate == null && workflowAssociation.InternalName.Contains("Xoml")) { WorkflowType = "SPD"; } else { WorkflowType = "OOTB"; } Console.WriteLine(workflowAssociation.ParentSite.Url + "$" + workflowAssociation.ParentList.DefaultViewUrl + "$" + workflowAssociation.Name + "$" + workflowAssociation.RunningInstances + "$" + WorkflowType); }
Reference for this post has taken from one of my friends blog
Thank you !!
No comments:
Post a Comment