Pure::Variants

The Pure::Variants adapter allows to access elements from the feature model and the family model of Pure::Variants. Properties of the original artifacts can be mapped to YT attributes. The adapter supports link extraction from the original model based on the natural relation of the model elements and reads their hierarchy.

Data access

The data access allows to restrict the resources that should be considered by the adapter.

Configuration

Open the YT configuration with the YT configuration editor, and add a new data access as described in section "Data accesses". Select Pure::Variants as data access type.

The configuration panel allows to define which files and folders the adapter should consider for data extraction.

Supported keywords:

  • resource – File filter pattern

Sample configuration for a single project :

resource "*.vdm"
resource "*.xfm"
resource "*.ccfm"

The example above will consider any .vdm file and any .xfm and .ccfm files.

Artifact type

The Pure::Variants adapter allows for flexible artifact configuration to specify which artifacts YAKINDU Traceability should import from the Pure::Variants data access. It also allows to define custom attributes and to map them to native attributes.

Configuration

Open the YT configuration with the YT configuration editor, and add a new artifact type as described in section "Artifact types". Select your previously-configured "Pure::Variants data access"

The configuration panel allows to define which native Pure::Variants artifacts should be included, based on their attributes and properties. The configuration language offers content assist to guide through the different options. In case no explicit configuration is supplied, all artifacts for the type in the scope of the data access are included.

Supported keywords:

  • != – „Not equals” operator to use within a condition
  • == – „Equals” operator to use within a condition
  • && – „And” operator to use within a condition
  • || – „Or” operator to use within a condition
  • ! – „Not” operator to use within a condition
  • contains – Constraint for substring check
  • include element if – Starts an include expression. Artifacts will be included if they satisfy the conditions within the expression.
  • map – Starts a mapping block.
  • to – Defines the relation of a custom attribute to the value it is mapped to.
  • name - Specifies the name of the artifact.
  • valueOf() – Starts a valueOf condition.
  • property() – Access to element properties.

Example:

include elements if (
	valueOf (type) == "ps:family"
	|| valueOf (type) == "ps:component"
)
name valueOf ("name") + " visible: " + valueOf (vname) + "(" + valueOf(type) + ")"
map{
	visualType to valueOf(vtype)
	activeValue to valueOf(value)
	ownRestrictions to valueOf(restrictions)
	ownAndChildrestrictions to valueOf(allRestrictions)
	propertyValue to property("Value")
}

The example above will load all elements that are of type "ps:family" or of type "ps:component".
The name of the artifact is set to the value of the "name" attribute followed by " visible: " followed by the visible name ( vname) and the type of the element.
Finally the map block is used to map attributes of the element to YT attributes. In this case, the YT attribute visualType is read from the vtype of the element and so on.

The Pure::Variants adapter allows to derive links based on the relation of model elements.

Open the YT configuration with the YT configuration editor, and add a new link type as described in section "Configuring a link type".

  • For both ends A and B, select an „PureVariants” artifact type.
  • As data access, select your previously-configured "PureVariants data access"

Supported keywords:

  • include relation if () – Starts the link expression. Links will be derived from relations and filtered by the following expressions.
  • && – „And” operator to use within a condition
  • || – „Or” operator to use within a condition
  • ! – „Not” operator to use within a condition
  • () – Braces to group conditions and combine them with higher priority in the braces
  • != – „Not equals” operator to use within a condition
  • == – „Equals” operator to use within a condition
  • contains – Constraint for substring check
  • valueOf() – Reads the attribute of the link
  • map – Starts a mapping block.
  • to – Defines the relation of a custom attribute to the value it is mapped to.
  • property() – Access to link properties.

Example:

include relation if (
  valueOf(class) != "ps:parent" &&
  valueOf(type) == "ps:alternative"
)
map {
 classifier to valueOf("class")
}

The example above will derive links from any feature where a link with type "ps:alternative" exists, to the alternatives. All "ps:parent" relations are ignored.

Version

An artifact’s version is used for suspicious links validation. Artifacts of this type do not provide a version.

Selection propagation

Selecting an artifact will open the element in pure::variants and any selected element in the feature or family model is recognized by YT, if configured.