| Methods / Methods for Archiving and Restoring Processes | 
| Name | Type | Description | 
|---|---|---|
| sql | string | A string that contains the where clause of the SQL statement you want to query. | 
// Build SQL Statement
string processDefinitionName = "Budget Request Approval Process";
string sqlWhereClause = string.Format("DEF_NAME ='{0}'",
processDefinitionName);
try
	{
    WFBaseProcessInstance[] archivedProcessInstances =
    svc.QueryArchivedProcInsts(sqlWhereClause)
	}
catch (Exception ex)
	{
    Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
	}