订阅处理程序抛出了System.FormatException [英] Subscription handler threw System.FormatException

查看:71
本文介绍了订阅处理程序抛出了System.FormatException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个间歇性地抛出此异常的工作流:

Activity Id10Sequence的订阅处理程序抛出System.FormatException:输入字符串的格式不正确。
System.Number.StringToNumber(String str,NumberStyles options,NumberBuffer& number,NumberFormatInfo info,Boolean parseDecimal)
System.Number.ParseInt32(String s,NumberStyles style,NumberFormatInfo info)
at System .Workflow.ComponentModel.CompositeActivity.TraverseDottedPath(String dottedPath)
at System.Workflow.ComponentModel.Activity.ResolveActivityByName(String activityQualifiedName,Boolean withinThisActivityOnly)
at System.Workflow.ComponentModel.Activity.GetActivityByName(String activityQualifiedName,Boolean withinThisActivityOnly)
System.Workflow.ComponentModel.Activity.MarkClosed()
System.Workflow.ComponentModel.Activity.MarkCompleted()
at System.Workflow.ComponentModel.ActivityExecutionContext.CloseActivity()
在System.Workflow.Activities.SequenceActivity.System.Workflow.ComponentModel.IActivityEventListener< System.Workflow.ComponentModel.ActivityExecution StatusChangedEventArgs> .OnEvent(Object sender,ActivityExecutionStatusChangedEventArgs e)
在System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)

然后重复抛出以下异常,直到运行时关闭:

补偿活动Id10Sequence抛出System.FormatException:输入字符串的格式不正确。
System.Number.StringToNumber(String str,NumberStyles options,NumberBuffer& number,NumberFormatInfo info,Boolean parseDecimal)
System.Number.ParseInt32(String s,NumberStyles style,NumberFormatInfo info)
at System .Workflow.ComponentModel.CompositeActivity.TraverseDottedPath(String dottedPath)
at System.Workflow.ComponentModel.Activity.ResolveActivityByName(String activityQualifiedName,Boolean withinThisActivityOnly)
at System.Workflow.ComponentModel.Activity.GetActivityByName(String activityQualifiedName,Boolean withinThisActivityOnly)
System.Workflow.ComponentModel.Activity.MarkClosed()
System.Workflow.ComponentModel.Activity.MarkFaulted()
at System.Workflow.ComponentModel.ActivityExecutionContext.CloseActivity()
在System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)


工作流程正在运行时更改时间,通过添加大约20个分支的ParallelActivity。 Id10Sequence 表示其中一个分支的SequenceActivity的名称。引用Reflector来查看抛出异常的位置,它似乎与解析活动的名称有关,但我可以看到我的任何活动的名称都没有问题,如果ApplyWorkflowChanges方法会遇到这样的问题,如果情况就是这样。

还查看了工作流实例的UserData,它是一个IDictionary,它通过"虚线路径"保存带有激活名称查找的内部IDictionary。并且所有这些路径似乎都是有序的。

我的运行时使用 SharedConnectionWorkflowCommitWorkBatchService, SqlTrackingService和 SqlWorkflowPersistenceService,都将EnableRetries设置为true。我正在使用EntLib的Logging块来捕获被抛出的异常。

有什么想法吗?

Hi,

I've got a workflow that intermittently throws this exception:

Subscription handler of Activity Id10Sequence threw System.FormatException: Input string was not in a correct format.    
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)    
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)    
at System.Workflow.ComponentModel.CompositeActivity.TraverseDottedPath(String dottedPath)    
at System.Workflow.ComponentModel.Activity.ResolveActivityByName(String activityQualifiedName, Boolean withinThisActivityOnly)    
at System.Workflow.ComponentModel.Activity.GetActivityByName(String activityQualifiedName, Boolean withinThisActivityOnly)    
at System.Workflow.ComponentModel.Activity.MarkClosed()    
at System.Workflow.ComponentModel.Activity.MarkCompleted()    
at System.Workflow.ComponentModel.ActivityExecutionContext.CloseActivity()    
at System.Workflow.Activities.SequenceActivity.System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.ActivityExecutionStatusChangedEventArgs>.OnEvent(Object sender, ActivityExecutionStatusChangedEventArgs e)    
at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)

then throws the following exception repeatedly until the runtime is shut down:

Compensate of Activity Id10Sequence threw System.FormatException: Input string was not in a correct format.    
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)    
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)    
at System.Workflow.ComponentModel.CompositeActivity.TraverseDottedPath(String dottedPath)    
at System.Workflow.ComponentModel.Activity.ResolveActivityByName(String activityQualifiedName, Boolean withinThisActivityOnly)    
at System.Workflow.ComponentModel.Activity.GetActivityByName(String activityQualifiedName, Boolean withinThisActivityOnly)    
at System.Workflow.ComponentModel.Activity.MarkClosed()    
at System.Workflow.ComponentModel.Activity.MarkFaulted()    
at System.Workflow.ComponentModel.ActivityExecutionContext.CloseActivity()    
at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)


The workflow is being changed at runtime, by adding a ParallelActivity with around 20 branches.  The Id10Sequence represents the name of the SequenceActivity for one of these branches. Having referred to Reflector to see where the exception is being thrown, it seems to have to do with resolving an activity's name, but I can see no problem with any of my activities' names, and the ApplyWorkflowChanges method would have caught such a problem if this were the case.

Also looked into the workflow instance's UserData, which is an IDictionary that holds an inner IDictionary with activty name lookups via a "dotted path" and all these paths seem to be in order.

My runtime is using a SharedConnectionWorkflowCommitWorkBatchService, SqlTrackingService and SqlWorkflowPersistenceService, all with EnableRetries set to true. I'm using EntLib's Logging block to capture the exceptions being thrown.

Any ideas?

推荐答案

没有想法在这一个?关闭已完成的活动似乎是一个问题,当活动的名称无法解析时,它会尝试将同一活动转换为故障状态,只会在执行时遇到相同的活动名称解析问题所以。

这可能是一个框架错误吗?我非常感谢WF团队的任何反馈。
No ideas on this one?  It seems to be an issue with closing an activity that has completed, and when the activity's name could not be resolved, it then tries to transition the same activity into a faulted state, only that it then encounters the same activity name resolution problem when doing so.

Could this be a Framework bug?  I'd really appreciate any feedback from the WF team.


这篇关于订阅处理程序抛出了System.FormatException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆