Biztalk Map, How to execute a scripting functoid ONLY IF the source message contains a specific value?

1.9k Views Asked by At

In a Biztalk map, how can I execute a scripting functoid ONLY IF the source message contains a specific value? Which functoid combination can allow me to do this?

Edit

I want to check a certain element for a specific value. The scripting will be inline xslt.

In response to 40Alpha first suggestion: This is the method I would like to use but I can't connect the scripting functoid to the value mapping functoid. I'm probably doing something wrong here?

Imgur

1

There are 1 best solutions below

2
S1r-Lanzelot On

The two easiest options (IMO) would be:

What I would do is:

  1. Create an Equal Functoid (1st condition being that "certain element" and 2nd condition being the text you would like to check it against)
  2. Create a Value Mapping Functoid and connect the Equal Functoid (that you just made) to it first and then connect it your scripting functoid.
  3. Now connect your scripting functoid to the desired target element(s).

OR a simpler approach would be:

Wrap your xslt with this in your scripting functoid:

<xsl:if test="/yournode[text()="SomeValue"]">
    <!--YOUR SCRIPTING HERE -->
</xsl:if>