我正在使用ASP.NET 3.5和WF 3.5。
我的代码不断给我一个FileNotFoundException。即使我已经创建了两个工作流实例。它一直试图抓住第一个工作流程(并告诉我装配不在那里),而不是第二个工作流程。这是我的代码:
Dim connectionString As String = ConfigurationManager.ConnectionStrings("LocalWFConnection").ConnectionString
Dim trackingQuery As SqlTrackingQuery = New SqlTrackingQuery(connectionString)
Dim options As SqlTrackingQueryOptions = New SqlTrackingQueryOptions()
Dim workflws As IList(Of SqlTrackingWorkflowInstance)
Try
workflws = trackingQuery.GetWorkflows(options)
Catch ex As SqlException
workflowError = String.Format("A SQL exception occurred. Details:<br />{0}", ex.Message)
Return workflowData
Catch ex As IO.FileNotFoundException
workflowError = String.Format("File loading exception occurred. Details:<br />{0}", ex.Message)
Return workflowData
End Try
答案 0 :(得分:0)
Dim trackingQuery As SqlTrackingQuery = New SqlTrackingQuery(connectionString)
Dim options As SqlTrackingQueryOptions = New SqlTrackingQueryOptions()
options.WorkflowType = GetType(Workflow1) ' where Workflow1 is the name of your Workflow