feature

Feature sind das zentrale Element im Produktmodel. Sie umfassen die anderen Modellelemente und sind die Basis für die rekursive Sprachstruktur.

XML Definition

Attribute Typ Beschreibung
title string (required) Identifier via FQN.
type Token Mandatory|optional. See Feature ‘type’.
alt string alternative title for external use in webshop
desc string some description, use CDATA declaration for HTML
info string some info, that you might need in frontend
tooltip string some info, that you might need in frontend
unit-name string cm, mm etc (if feature corresponds to a measurable value)
sorting integer used for sorting in angular, not checked for consistence
ext-id string an external id string field , if you need it in frontend
context strings context names separated by semicolon

XML Child Elements

Child Node Beschreibung
int attribute
enum Attribute
bool Attribute
feature Rekursion, Sub-Feature ist vollwertiges Feature-Element
group Group
requires Einschränkung
excludes Ausschluss
implies Implikation
ifonlyif Genau dann wenn
preselection Vorauswahl (initial oder conditional)
constraint Constraint
attachement Attachement

Example:

<feature title="PC" type="mandatory">
  <group type="OneOf">
    <feature title="Desktop-PC" >
      <enum title="Size">
        <elem>i5</elem>
        <elem>i7</elem>
      </enum>
    </feature>
    <feature title="Laptop" />
  </group>
</feature>

Json Response

Nach Aufruf GET /product wird das Feature im Json repräsentiert.

Feature ‘type’

(nothing = ordinary)

  • user can select or deselect the feature
  • if feature is selected, parent feature will be selected as well
  • user has to make a decision: if feature is ‘undecided’, parent feature can’t be ‘final’

mandatory

  • user can select the feature
  • if feature is selected, parent feature will be selected as well
  • feature will be automatically selected, if parent feature is selected
  • Important: if parent feature is selected, user cannot deselect the mandatory child feature, because their is no user constraint on the child feature and thus, releaseDecision has no effect .. you need to release the decision on the parent and child will be relase as well (i.e. mandatory is a language constraint ‘sprach-constraint’, c.f. Typen von Constraints).

optional

  • user can select or deselect the feature
  • if feature is selected, parent feature will be selected as well
  • user don’t need to make a decision: if feature is ‘undecided’, parent feature can be ‘final’ (depending on parent features other child features)
  • Important: if a feature is ‘optional’, it will be always ‘isFinal’ and ‘isFinalAll’, even if subfeatures are type mandatory or ordinary