Import Filter
Import Mapping with Property Filtering
When creating import mapping rules, you can extend them by using a property filtering to only import elements matching those filter conditions.
How Property Filtering Works
For each mapping rule you can define conditions that determine which items are imported. Instead of importing all items of a given type, you can restrict the import to those that match specific property values.
For example, you might configure a rule to import only items in the Approved state. This ensures that only approved requirements are used for tracing in the Enterprise Architect model.
Any Jama 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 are combined with an AND condition. For example, if you add a property filter for both the Status and the Priority field, both conditions must be true for the element to be imported.
Combining the same property filter with an 'OR' condition
If you want to filter for properties with an 'OR' condition, you have to add two separate matching rules, where both contain an "IS" filter for the two values that should be combined. See an example here: OR Condition Filter
Example Property Filtering
The base matching rule for importing items from a SYSRQ set in Jama Connect is for example:
<matchingRule>
<externalProperty name='_objectType' value='SYSRQ' />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
In order to only import a system requirement item if its status is set to Approved, the matching rule has to look like this:
<matchingRule>
<externalProperty name='_objectType' value='SYSRQ' />
<externalProperty name="status" value="=IS:Approved" />
<myumlProperty name='_objectType' value='Class' />
<myumlProperty name='_stereotype' value='EA Specifics 1.0::requirement' />
</matchingRule>
Syntax for IS and HAS conditions
Make sure to not forget the equal sign "=" inside the quotes of the value for the property:
value="=IS:Approved"
Import Filter Keywords
There are two keywords available:
| Keyword | Meaning | Example Usage | Result |
|---|---|---|---|
| IS | Used for single value fields, like Status, Priority, etc. The element is imported if the given field is set to the value in the filter condition. | <externalProperty name="priority" value="=IS:High" /> |
Only items with a priority set to "High" are imported. |
| HAS | Used for multi value fields, like Verification Methods. The element is imported if the given field has at least the values from the filter condition set. | <externalProperty name="verification_methods" value="=HAS:Inspection,Test" /> |
Only items which have at least a verification method of "Inspection" AND "Test" are imported. |
Examples
Import Approved Requirements With a High Priority
In Jama Connect, the following system requirement items are given:
- name = Item001, status = Rework, priority = High
- name = Item002, status = Approved, priority = High
- name = Item003, status = Approved, priority = Low
- name = Item004, status = Ready for Review, priority = Medium
The following mapping rule is used:
<matchingRule>
<externalProperty name='_objectType' value='SYSRQ' />
<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:
Item002 is the only item that is imported to Enterprise Architect.
Import Requirements With Verfication Methods Inspection and Test
In Jama Connect, the following system requirement items are given:
- name = Item001, verification methods = Test
- name = Item002, verification methods = Inspection
- name = Item003, verification methods = Inspection, Test
- name = Item004, verification methods = Analysis, Inspection, Test
The following mapping rule is used:
<matchingRule>
<externalProperty name='_objectType' value='SYSRQ' />
<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 to Enterprise Architect, because those items have at least both values at the same time.
Import Requirements With Priority Set to High OR Medium
In Jama Connect, the following system requirement items are given:
- name = Item001, priority = High
- name = Item002, priority = High
- name = Item003, priority = Low
- name = Item004, priority = Medium
The following mapping rules are used (make sure to create two separate element rules):
<elementRule>
<matchingRule>
<externalProperty name='_objectType' value='SYSRQ' />
<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='SYSRQ' />
<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 to Enterprise Architect.