我已将新VM(运行Windows Server 2003的MS虚拟服务器)配置为托管BizTalk服务器2006的现有VM的副本。我遇到了BRE处理问题。该策略已部署,词汇表与正在运行的VM完全一致。
业务流程调用辅助组件,而辅助组件又使用BRE组件。助手组件中似乎执行的最后一行是:
Policy workflowPolicy = new Policy(policyName)
我已粘贴下面事件日志中的堆栈跟踪:
Exception type: InvalidCastException
Source: Microsoft.RuleEngine
Target Site: Int32 GetInt32(System.String, Int32)
The following is a stack trace that identifies the location where the exception occured
at Microsoft.RuleEngine.Configuration.GetInt32(String key, Int32 defaultValue)
at Microsoft.RuleEngine.ReteTranslator.RuleSetToReteTranslatorImpl.Translate(RuleSet ruleset, Int32 duration)
at Microsoft.RuleEngine.ReteTranslator.RuleSetToReteTranslator.Translate(RuleSet ruleset, Int32 duration)
at Microsoft.RuleEngine.RuleEngine..ctor(RuleSet ruleSet, Boolean doOptimizations)
at Microsoft.RuleEngine.RuleEngineCache.Allocate(String rulesetName, Int32 majorRevision, Int32 minorRevision, TrackingConfiguration& trackingConfig)
at Microsoft.RuleEngine.RuleEngineCache.Allocate(String rulesetName, TrackingConfiguration& trackingConfig)
at Microsoft.RuleEngine.Policy..ctor(String policyName)
at Tesco.BRE.Services.PolicyServices.Direct.OrderWorkflowServices.Commands.GetNextTaskList.Execute()
at Tesco.DataSources.Integration.Common.CommandBase.CommandDecorators.CommandLoggingDecorator`1.Execute()
at Tesco.DataSources.Integration.Common.CommandBase.CommandUtilities.GetCommandResponse[T](CommandBase`1 command)
at Tesco.BRE.Services.PolicyServices.Direct.OrderWorkflowServices.OrderWorkflowOperations.GetNextTaskList(String currentTaskName, String currentTaskStatus, XmlDocument order)
at Tesco.Direct.OrderManagement.Orchestrations.FollowTaskResult.segment2(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception&
看起来Microsoft.RuleEngine.Configuration.GetInt32传递了一个无法强制转换为Int32的值?
我尝试取消配置/重新配置BRE。据我所知,新服务器上的所有内容都完全按照工作服务器配置。
任何帮助,感激地收到 - 我一直坚持这一天!
答案 0 :(得分:1)
如果跟踪堆栈跟踪,则可以读取“缓存”和“跟踪”。我会尝试重新启动主机并取消选中HAT中的任何规则跟踪。
答案 1 :(得分:1)
感谢您对Martin的回应。我现在已经解决了这个问题。问题是用户错误(我的)进行注册表更改。我必须创建一个reg设置如下
HKLM\SOFTWARE\Microsoft\BusinessRules\3.0\StaticSupport (DWORD), value 2
以使BRE能够使用静态方法。这在http://technet.microsoft.com/en-us/library/dd298814.aspx
中描述虽然在配置服务器时我已经添加了,但我无意中使用了字符串而不是dword。因为这花了我一天多的时间才弄明白 - 我不会很快犯同样的错误!