Specificity of Suppressions and Multiple Suppressions
Copy
As many Suppressions as required can be added to a single ItemAnalysis.Suppressions file. To add additional Suppressions, a second node of the required values must be added. An example of multiple Suppressions in a single file is included below:
<itemAnalysis>
<suppressions>
<whereAttribute>
<template><![CDATA[[Part].id IN (SELECT id FROM [PART] WHERE description = @Parameter)]]></template>
</whereAttribute>
<whereAttribute>
<template><![CDATA[[Part].id IN (SELECT id FROM [PART] WHERE cost > @Parameter)]]></template>
</whereAttribute>
<conditionInProperty>
<template><![CDATA[(SELECT cost FROM [innovator].[PART] WHERE [item_number] IN (@ParametersList))]]></template>
</conditionInProperty>
...
</suppressions>
</itemAnalysis>
As demonstrated, however, the Suppressions that are defined in the ItemAnalysis.Suppressions file are explicit in their interpretation. If an AML sent from a client does not pass the ItemAnalysis or match the Suppression precisely, the AML will be rejected.
As an example, given the original <whereAttribute> Suppression node:
<whereAttribute>
<template><![CDATA[[Part].id IN (SELECT id FROM [PART] WHERE cost = @Parameter)]]></template>
</whereAttribute>
The following query will succeed:
<AML>
<Item action="get" type="Part" where="[Part].id IN (SELECT id FROM [PART] WHERE cost = 5)"/>
</AML>
While the following query will throw an Item Analysis Error:
<AML>
<Item action="get" type="Part" where="[Part].id IN (SELECT id FROM [PART] WHERE cost > 5)"/>
</AML>
In order for the second query to succeed, an additional <whereAttribute> node must be added to an ItemAnalysis.Suppressions file.