using
System;
System.Collections.Generic;
System.Linq;
System.Text;
Microsoft.SharePoint;
Microsoft.SharePoint.Workflow;
namespace
RahulListOutSPDWorkflows
{
class
Program
static
void
Main(
string
[] args)
try
Console.WriteLine(
"This tool will provide you the list of SPD workflows and asociated lists in a site"
);
"Please enter the url of the site"
String webUrl = Console.ReadLine();
(SPSite site =
new
SPSite(webUrl))
(SPWeb web = site.OpenWeb())
SPListCollection lists = web.Lists;
foreach
(SPList list
in
lists)
SPWorkflowAssociationCollection wAssociations = list.WorkflowAssociations;
(SPWorkflowAssociation wAssociation
wAssociations)
if
(wAssociation.BaseTemplate ==
null
)
"The List "
+ list.Title +
" has SPD workflow "
+ wAssociation.Name);
}
"Execution Completed"
Console.ReadLine();
catch
(Exception e)
Console.WriteLine(e.StackTrace);