Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BizTalk Rules TypedXMLDocument and JScript.NET

5 views
Skip to first unread message

Dominic Messenger

unread,
Jul 23, 2004, 1:35:39 PM7/23/04
to
I have a project that uses JScript.NET to provide custom facts and
functions with the RuleEngine.

This works fine for all primitive types, but fails miserably when I
attempt to pass it a TypedXmlDocument. For instance, I may have a
function as follows:

public static function DoSomething(doc:
Microsoft.RuleEngine.TypedXmlDocument) : double {....}

that is called from a predicate. What is passed is, in fact a
System.String and I get an InvalidCastException.

The Rules Composer shows the type of the argument as a
Microsoft.RuleEngine.TypedXmlDocument.

If I change the code from JScript.Net to C# it works fine.

If I invoke the JScript.NET method directly, passing in the correct
TypedXmlDocument, it works fine.

But in the engine it doesn't.

All other JScript.Net methods work fine, but only if their arguments
are primitive types.

What can I do to resolve this ? Any tips/hints/pointers ?

TIA

Dominic

0 new messages