SqlTrackingQuery.GetWorkflows 未获取正确的工作流程

发布于 2024-11-17 19:07:17 字数 909 浏览 2 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

悲念泪 2024-11-24 19:07:17
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
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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文