The task 1. Get links to workflow statistics. 2. Get workflow tasks programmatically. 3. Get workflow history programmatically Solution 1. Links to workflow statistics: foreach (SPWorkflow wf in list_item.Workflows) { string sLink = string.Format("{0}/_layouts/WrkStat.aspx?List={1}&WorkflowInstanceID={2}", web.Url, wf.ListId, wf.InstanceId) } web.Url above is the Url property of SPWeb instance. 2. Workflow tasks: foreach (SPWorkflowTask wt in wf.Tasks) { // get any information you like about the wt object, i.e. in this scenario we will output link to the task string sLink = string.Format("{0}/Lists/{1}/DispForm.aspx?ID={2}", web.Url, SPEncode.UrlEncode(wt.ParentList.Title), wt["ID"]) ... } 3. Workflow history: Class SPWorkflow has a member HistoryList which represents history list for the workflow. Let's assume that we are using the SPWorkflow object - wf - from above. 3.1. First we have to make a query to extract history list item ...
This blog is about SharePoint and related technologies.