Throwing exception from BizTalk custom XSLT

In one of my recent project, we get invoice files from SAP which has to be converted to EDIFACT format in BizTalk map, which is completely done using custom XSLT before sending it to customer.

I had to check inside the map if a particular field is available in IDOC and terminate immediately if the field does not exist.

I got the solution from the below link

http://btsguru.blogspot.in/2013/06/biz-talk-how-to-throw-custom-exception.html

<xsl:message terminate=”yes”>Custom error text</xsl:message>

The above XSLT  construct can be called inside any conditional statement in the BizTalk XSLT transformation to raise exception.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s