Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Input Parameters for a Scripting Functoid
- This topic has 2 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
August 12, 2010 at 3:20 AM #25613
Hello everybody!!
I am a newbie with Biztalk Server 2010 (Beta). I am testing mappings with BT2010 for my company.
But I run into a big problem. I have tree Scripting functoids (C#) which return a “bool[] bArray” and a fourth C# Scripting Functoid uses this tree boolean Array as input parameters. But here is my problem. The third Script doesnt receive bool[] parameters as input values but System.String types.
Here is the error message I get: Object of type ‘System.String’ cannot be converted to type ‘System.Boolean[]’
Here are my tree C# script functoids which return a boolean Array:
public bool[] Array_Sonst_Typ (bool Sonst_TypPARKHAUS, bool Sonst_TypTANKSTELLE, bool Sonst_TypGARAGEN, bool Sonst_TypPARKFLACHEN )
{ bool
[] bArray = { Sonst_TypPARKHAUS, Sonst_TypTANKSTELLE, Sonst_TypGARAGEN, Sonst_TypPARKFLACHEN };return bArray;
}public bool[] Array_Grundst_Typ (bool Grundst_TypWOHNEN, bool Grundst_TypGEWERBE, bool Grundst_TypINDUSTRIE, bool Grundst_TypLAND, bool Grundst_TypLAND2 )
{
bool[] bArray = { Grundst_TypWOHNEN, Grundst_TypGEWERBE, Grundst_TypINDUSTRIE, Grundst_TypLAND, Grundst_TypLAND2 };
return bArray; }
public bool[] Array_ObjektArt(bool CheckForZimmer, bool CheckForWohnung, bool CheckForHaus, bool CheckForGrundst, bool CheckForGrundst_Typ, bool CheckForBuero, bool CheckForHandel, bool CheckForGastgwb, bool CheckForHallen, bool CheckForLand, bool CheckForSonst, bool CheckForSonst_Typ, bool CheckForFreizeit, bool CheckForZinshaus)
{
bool[] bArray = { CheckForZimmer, CheckForWohnung, CheckForHaus, CheckForGrundst, CheckForGrundst_Typ, CheckForBuero, CheckForHandel, CheckForGastgwb, CheckForHallen, CheckForLand, CheckForSonst, CheckForSonst_Typ, CheckForFreizeit, CheckForZinshaus };
return bArray; }
This is the a part of my XSLT result after “Validate Map”:
<xsl:variable name=”var:v30″ select=”ScriptNS0:IWObjektArt(string($var:v15) , string($var:v22) , string($var:v28) , string($var:v29))” />
The input parameters are strings but should be boolean! :-X
And here is my receiving C# script:
public int IWObjektArt(bool[] bObjektArt, bool[] bGrundst_Typ, bool[] bSonst_Typ, bool IsWAZ )
{…..}
When I run “Test Map” I get the previous error message!
I hope you can helm me out!!! 🙂
-
August 12, 2010 at 11:00 PM #25621
Unfortunately you have hit one of the constraints of using the mapper. All parameters passed to scripting functoids are wrapped in the xpath string() function. There is no way I know of, to change this behaviour.
The only solution is to use to custom Xslt.
-
August 13, 2010 at 1:08 AM #25623
Or I will have to use concatenation and force the parameter to return string. Thats my workaround. XSLT is the next possible way of doing this. I will compare boths methods.
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.