An XSLT based rule that returns a RuleExceptionDataCollection type.
The collection looks like this in the xslt.
<RuleExceptionDataCollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:if test="1 = 1">
<xsl:call-template name="Exception">
<xsl:with-param name="FieldName">TestField</xsl:with-param>
<xsl:with-param name="EntityName">TestEntity</xsl:with-param>
<xsl:with-param name="Message"><xsl:value-of select="AS:GetString('TestError')"/></xsl:with-param>
<xsl:with-param name="Severity">High</xsl:with-param>
<xsl:with-param name="HttpStatusCode">402</xsl:with-param>
</xsl:call-template>
</xsl:if>
</RuleExceptionDataCollection>
HttpStatusCode
Is returned through modelled API when the validation rule fails. This should be a standard http return code (400, 402, 404…).
Used In
- EndRule
- SaveValidationBeforeMerge
- ConfirmationRule (input data is a
/row
context containing changed rows only)
- ConfirmationRule (input data is based on the screen’s data structure but contains only data edited by the user since loaded from the database)
- SaveConfirmationRule