SqlTrackingQuery.GetWorkflows 未获取正确的工作流程
我正在使用 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
I'm using ASP.NET 3.5 and WF 3.5.
The code I have is constantly giving me a FileNotFoundException. Even though I have created two workflow instances. It keeps trying to grab the first Workflow (and tells me the assembly is not there) and not the second workflow. This is my code:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)