Example for throw exception extension
In the previous example of decode base64 string extension, you can perform additional business validations. For example, you can verify whether the value of the 'Amount' element in the purchase order is an integer. If not, you can throw an exception using the 'throwException' extension. If this extension is called, the mapping step throws a confirm BOD with the specified reason and the execution of the document flow is terminated
To invoke this extension, use this XSLT sample:
<xsl:if test="not($Amount castable as xs:integer)">
<xsl:comment select="extensions:throwException('Extended Amount value is not an integer')"/>
</xsl:if>