Windows工作流运行时(.NET 4.0)在调度从不运行的SequentialWorkflowActivity后被随机卡住(挂起)
这是我在论坛上的第一篇帖子,因为我两周来一直试图解决的一个难题促使我这么做 背景:我正在运行windows XP上运行的.NET WPF应用程序中运行.NET 4.0中的WWF。我们每天多次使用相同的活动启动工作流,80%的时间工作流成功完成。20%的时间工作流被卡住,或在我们启动后立即挂起 我们已经在调试器中复制了挂起问题,并启用了WF日志记录。这是控制台输出的外观:Windows工作流运行时(.NET 4.0)在调度从不运行的SequentialWorkflowActivity后被随机卡住(挂起),.net,workflow-foundation-4,.net,Workflow Foundation 4,这是我在论坛上的第一篇帖子,因为我两周来一直试图解决的一个难题促使我这么做 背景:我正在运行windows XP上运行的.NET WPF应用程序中运行.NET 4.0中的WWF。我们每天多次使用相同的活动启动工作流,80%的时间工作流成功完成。20%的时间工作流被卡住,或在我们启动后立即挂起 我们已经在调试器中复制了挂起问题,并启用了WF日志记录。这是控制台输出的外观: System.Workflow.Runtime.Hosting Information: 0 : Creating insta
System.Workflow.Runtime.Hosting Information: 0 : Creating instance 5d309d9c-1a35-46a1-b0df-e10c6ab04a58
System.Workflow.Runtime Information: 0 : Queuing Service: Creating new Queue with ID -37063737 for *PendingNotifications
System.Workflow.Runtime.Hosting Information: 0 : TimerEventSubscriptionQueue: 5d309d9c-1a35-46a1-b0df-e10c6ab04a58 Created
System.Workflow.Runtime Information: 0 : Adding context 1:New Recipe Workflow
System.Workflow.Runtime.Hosting Information: 0 : WorkflowRuntime:: replacing unusable executor for key 5d309d9c-1a35-46a1-b0df-e10c6ab04a58 with new one (hc: 21789324)
System.Workflow.Runtime.Hosting Information: 0 : WorkflowRuntime dispensing resource instanceId: 5d309d9c-1a35-46a1-b0df-e10c6ab04a58, hc: 21789324
System.Workflow.Runtime Transfer: 0 : , relatedActivityId=00000000-0000-0000-0000-000000000000
System.Workflow.Runtime Stop: 0 : Workflow Trace
System.Workflow.Runtime Transfer: 0 : , relatedActivityId=5d309d9c-1a35-46a1-b0df-e10c6ab04a58
System.Workflow.Runtime Start: 0 : Workflow Trace
System.Workflow.Runtime Information: 0 : Activity Status Change - Activity: New Recipe Workflow Old:Initialized; New:Executing
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 5d309d9c-1a35-46a1-b0df-e10c6ab04a58 : Scheduling entry: SubscriptionEvent((1)New Recipe Workflow, ActivityStatusChange('(1)New Recipe Workflow', Executing, None))
System.Workflow.Runtime.Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity New Recipe Workflow
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 5d309d9c-1a35-46a1-b0df-e10c6ab04a58 : Scheduling entry: ActivityOperation((1)New Recipe Workflow, Execute)
System.Workflow.Runtime.Hosting Information: 0 : Scheduling work for instance 5d309d9c-1a35-46a1-b0df-e10c6ab04a58
System.Workflow.Runtime Transfer: 0 : , relatedActivityId=00000000-0000-0000-0000-000000000000
System.Workflow.Runtime Stop: 0 : Workflow Trace
The thread '<No Name>' (0x15d0) has exited with code 0 (0x0).
The thread '<No Name>' (0x23bc) has exited with code 0 (0x0).
The thread '<No Name>' (0x1b44) has exited with code 0 (0x0).
The thread '<No Name>' (0x2fa0) has exited with code 0 (0x0).
(end of debug log)
从我在日志中看到的情况来看,中断状态和工作状态都安排了活动。计划后,中断(卡住)状态实际上不会运行活动
这确实是随机发生的,没有例外,当我检查线程时,没有任何东西可以告诉我等待任何事件的活动/工作流
如果您对调试此问题有任何建议,我们将不胜感激
提前谢谢 点击查看更多视图。您是否有任何活动级别跟踪,以显示所包含活动的执行情况。是的,正如您在工作案例中所看到的。执行活动显示在我的日志中。不幸的是,它从不在中断状态下执行活动,因为WF的队列没有运行它们。
System.Workflow.Runtime.Hosting Information: 0 : Creating instance 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63
System.Workflow.Runtime Information: 0 : Queuing Service: Creating new Queue with ID -37063737 for *PendingNotifications
System.Workflow.Runtime.Hosting Information: 0 : TimerEventSubscriptionQueue: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 Created
System.Workflow.Runtime Information: 0 : Adding context 1:New Recipe Workflow
System.Workflow.Runtime.Hosting Information: 0 : WorkflowRuntime:: replacing unusable executor for key 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 with new one (hc: 7648267)
System.Workflow.Runtime.Hosting Information: 0 : WorkflowRuntime dispensing resource instanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63, hc: 7648267
System.Workflow.Runtime Transfer: 0 : , relatedActivityId=00000000-0000-0000-0000-000000000000
System.Workflow.Runtime Stop: 0 : Workflow Trace
System.Workflow.Runtime Transfer: 0 : , relatedActivityId=744f3ca1-5ea1-49bb-aa2b-72b1233fcc63
System.Workflow.Runtime Start: 0 : Workflow Trace
System.Workflow.Runtime Information: 0 : Activity Status Change - Activity: New Recipe Workflow Old:Initialized; New:Executing
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Scheduling entry: SubscriptionEvent((1)New Recipe Workflow, ActivityStatusChange('(1)New Recipe Workflow', Executing, None))
System.Workflow.Runtime.Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity New Recipe Workflow
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Scheduling entry: ActivityOperation((1)New Recipe Workflow, Execute)
System.Workflow.Runtime.Hosting Information: 0 : Scheduling work for instance 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63
System.Workflow.Runtime Transfer: 0 : , relatedActivityId=00000000-0000-0000-0000-000000000000
System.Workflow.Runtime.Hosting Information: 0 : Running workflow 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63
System.Workflow.Runtime Transfer: 0 : , relatedActivityId=744f3ca1-5ea1-49bb-aa2b-72b1233fcc63
System.Workflow.Runtime Start: 0 : Workflow Trace
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Running scheduled entry: SubscriptionEvent((1)New Recipe Workflow, ActivityStatusChange('(1)New Recipe Workflow', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Done with running scheduled entry: SubscriptionEvent((1)New Recipe Workflow, ActivityStatusChange('(1)New Recipe Workflow', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Running scheduled entry: ActivityOperation((1)New Recipe Workflow, Execute)
System.Workflow.Runtime Information: 0 : Activity Status Change - Activity: Delay Old:Initialized; New:Executing
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Scheduling entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Scheduling entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Scheduling entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime.Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity Delay
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Scheduling entry: ActivityOperation((1)Delay, Execute)
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Done with running scheduled entry: ActivityOperation((1)New Recipe Workflow, Execute)
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Running scheduled entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Done with running scheduled entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Running scheduled entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Done with running scheduled entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Running scheduled entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Done with running scheduled entry: SubscriptionEvent((1)Delay, ActivityStatusChange('(1)Delay', Executing, None))
System.Workflow.Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 744f3ca1-5ea1-49bb-aa2b-72b1233fcc63 : Running scheduled entry: ActivityOperation((1)Delay, Execute)
(app continues running workflow...)