Import Filter
Import Mapping with Property Filters
Import mapping rules can be extended by using property filters to import only elements that match specific filter conditions.
How Property Filtering Works
For each mapping rule, you can define filter conditions that determine which items are imported. Instead of importing all items of a given type, only items matching the configured property values are imported.
For example, you might configure a rule to import only items in the Approved state. This ensures that only approved requirements are imported into the Enterprise Architect model and available for tracing.
Any Polarion field from your item type configuration can be used for filtering. You can also combine multiple conditions to explicitly define which items are relevant for your project.
Combining Multiple Property Filter Conditions
Multiple property filter conditions within the same matching rule are combined using a logical AND. For example, if you add a property filter for both the Status and Priority fields, both conditions must be true for the element to be imported.
Property filter conditions within a single matching rule cannot be combined using OR logic. To achieve OR behavior, create multiple matching rules.
See: Import Requirements with Priority Set to High or Medium
Example Property Filtering
The base matching rule for importing items from a requirement set in Polarion:
<matchingRule>
<externalProperty name='_objectType' value='requirement' />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
To import only system requirements whose status is set to Approved, the matching rule can be configured as follows:
<matchingRule>
<externalProperty name='_objectType' value='requirement' />
<externalProperty name="status" value="=IS:Approved" />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
Filter Syntax
Property filters use one of the following formats:
=IS:<value>=HAS:<value1>,<value2>,...
The leading equal sign (=) is required.
Import Filter Keywords
| Keyword | Meaning | Example Usage | Result |
|---|---|---|---|
| IS | Used for single-value fields, such as Status or Priority. The element is imported if the field exactly matches the specified value. | <externalProperty name="priority" value="=IS:High" /> |
Only items with a priority of High are imported. |
| HAS | Used for multi-value fields, such as Verification Methods. The element is imported if the field contains at least all values specified in the filter. | <externalProperty name="verification_methods" value="=HAS:Inspection,Test" /> |
Only items that contain both Inspection and Test are imported. |
Examples
Import Approved Requirements with High Priority (AND)
In Polarion, the following system requirement items exist:
Item001— Status: Rework, Priority: HighItem002— Status: Approved, Priority: HighItem003— Status: Approved, Priority: LowItem004— Status: Ready for Review, Priority: Medium
The following mapping rule is used:
<matchingRule>
<externalProperty name='_objectType' value='requirement' />
<externalProperty name="status" value="=IS:Approved" />
<externalProperty name="priority" value="=IS:High" />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
Result
Only Item002 is imported into Enterprise Architect.
Import Requirements with Verification Methods Inspection and Test
In Polarion, the following system requirement items exist:
Item001— Verification Methods: TestItem002— Verification Methods: InspectionItem003— Verification Methods: Inspection, TestItem004— Verification Methods: Analysis, Inspection, Test
The following mapping rule is used:
<matchingRule>
<externalProperty name='_objectType' value='requirement' />
<externalProperty name="verification_methods" value="=HAS:Inspection,Test" />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
Result
Item003 and Item004 are imported into Enterprise Architect because both items contain the values Inspection and Test in field verification_methods.
Import Requirements with Priority Set to High or Medium (OR)
In Polarion, the following system requirement items exist:
Item001— Priority: HighItem002— Priority: HighItem003— Priority: LowItem004— Priority: Medium
The following mapping rules are used (create two separate element rules):
<elementRule>
<matchingRule>
<externalProperty name='_objectType' value='requirement' />
<externalProperty name="priority" value="=IS:High" />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
<properties>
<property external="id" myuml="::Id" />
<property external="key" myuml="::Key" />
<property external="uri" myuml="::Uri" />
<property external="type" myuml="::Type" />
<property external="name" myuml="Name" />
<property external="description" myuml="Documentation" />
</properties>
</elementRule>
<elementRule>
<matchingRule>
<externalProperty name='_objectType' value='requirement' />
<externalProperty name="priority" value="=IS:Medium" />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
<properties>
<property external="id" myuml="::Id" />
<property external="key" myuml="::Key" />
<property external="uri" myuml="::Uri" />
<property external="type" myuml="::Type" />
<property external="name" myuml="Name" />
<property external="description" myuml="Documentation" />
</properties>
</elementRule>
Result
Item001, Item002 and Item004 are imported into Enterprise Architect.