08-09-04 10:50 PM
Hi,
I have a simple BizTalk Rules Engine Policy that checks for a
condition in a message, and if the contition exists, it calls a .net
class to add a field from the current message into an ArrayList(). If
I hardcode the parameter to the method as a string, all works fine.
As soon as a change the rule to pull out a field from the message and
pass that into the .net class method, I blow up in the rules engine.
I'm unable to get breakpoints to fire in BTSNTSvc.exe in the
non-working case, however they do fire in the case where I hardcode
strings. Any ideas?
Thanks,
Brent.
Microsoft.RuleEngine.PolicyExecutionException: An exception occurred
inside the rule engine instance executing policy "KeywordMining". --->
Microsoft.RuleEngine. RuleEngineRuntimeMemberInvocationFailure
Exception:
An exception occurred when invoking class member
KeywordUtils.KeywordList.AddKeyword in assembly KeywordUtils,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=e01bf397f73ec37b.
---> System.ArgumentException: Object type cannot be converted to
target type.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[]
parameters)
at Microsoft.RuleEngine.Rete.ClassMemberMethod.Invoke(Object
classObject, Object[] parameters)
--- End of inner exception stack trace ---
at Microsoft.RuleEngine.Rete.Rete.ProcessException(Exception ex)
at Microsoft.RuleEngine.Rete.Rete.ExecuteInternal(Object facts,
Object data)
at Microsoft.RuleEngine.Rete.Rete.ProcessingLoop(Operation
operation, Object facts, Object data, EngineState nextState)
at Microsoft.RuleEngine.Rete.Rete.Execute(Object facts)
at Microsoft.RuleEngine.RuleEngine.Execute(Object facts)
at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
--- End of inner exception stack trace ---
at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
at Microsoft.RuleEngine.Policy.Execute(Object facts)
at Microsoft.RuleEngine.Policy.Execute(Object[] facts)
at RE.KeywordMinor.segment3(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
Microsoft.RuleEngine.PolicyExecutionException
Scoped@
KeywordMinor.??__scope0
KeywordMinor.Transaction_2
KeywordMinor.KeywordMinor
AdTarget.AdTarget
00000000-0000-0000-0000-000000000000
Microsoft.RuleEngine.PolicyExecutionException: An exception occurred
inside the rule engine instance executing policy "KeywordMining". --->
Microsoft.RuleEngine. RuleEngineRuntimeMemberInvocationFailure
Exception:
An exception occurred when invoking class member
KeywordUtils.KeywordList.AddKeyword in assembly KeywordUtils,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=e01bf397f73ec37b.
---> System.ArgumentException: Object type cannot be converted to
target type.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[]
parameters)
at Microsoft.RuleEngine.Rete.ClassMemberMethod.Invoke(Object
classObject, Object[] parameters)
--- End of inner exception stack trace ---
at Microsoft.RuleEngine.Rete.Rete.ProcessException(Exception ex)
at Microsoft.RuleEngine.Rete.Rete.ExecuteInternal(Object facts,
Object data)
at Microsoft.RuleEngine.Rete.Rete.ProcessingLoop(Operation
operation, Object facts, Object data, EngineState nextState)
at Microsoft.RuleEngine.Rete.Rete.Execute(Object facts)
at Microsoft.RuleEngine.RuleEngine.Execute(Object facts)
at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
--- End of inner exception stack trace ---
at Microsoft.RuleEngine.Policy.ExecuteInternal(Object facts)
at Microsoft.RuleEngine.Policy.Execute(Object facts)
at Microsoft.RuleEngine.Policy.Execute(Object[] facts)
at RE.KeywordMinor.segment3(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
Microsoft.RuleEngine.PolicyExecutionException
[ Post a follow-up to this message ]
|