Product Variants Release Candidate 22.6 RC1

The release candidate 1 for Product Variants 22.6 offers, besides the update to Faktor-IPS 22.6.0 RC1 and the unique-ID switch from Faktor-IPS 21.12.4 and Product Variants 21.12.2, a new option to configure which runtime ID prefix is used for variant components. The options are:

  • FromReferenceProject: As previously, the project, that contains the varied product component (or references it, when it comes from a Maven dependency not present as a workspace project), is used to determine the runtime ID prefix for the variant component. When the component with the ID “a.Component 2022-01” (from a project with the prefix “a.”) is varied, the variant component’s ID will be “a.Component_2022-01_Variant 2022-06”. When different developers have the varied component’s origin project (with prefix “a.”) in their workspace or sometimes only the referencing project (with prefix “b.”), it may happen that the ID is generated as “b.Component_2022-01_Variant 2022-06” – or “v.Component_2022-01_Variant 2022-06” when only the variant project (with the prefix “v.”) is in the workspace.
  • FromVariantProject: The prefix for the variant component is always used from the configuration of the project containing the variant. When the component with the ID “a.Component 2022-01” is varied in the variant project with the prefix “v.”, the variant component’s ID will be “v.Component_2022-01_Variant 2022-06”.

The configuration is done as for the unique IDs in the XML of the .ipsproject file:

<FeatureConfigurations>
 <FeatureConfiguration featureId="org.faktorips.productvariant">
  <Property name="VariantCmptRuntimeIdPrefix" value="FromVariantProject" />
  <!-- maybe as well <Property name="UseUniqueIds" value="OnlyForVariedComponents" /> -->
 </FeatureConfiguration>
</FeatureConfigurations>

A switch of the setting should be planned carefully, as changes of the runtime IDs may lead to the need for a migration of persisted policies referencing the old IDs.