Configurable features
The aspect of the Flow Repository that accounts for most uses of WebSphere Commerce Flow is the description of a store or site's configurable features.
A feature describes the available choices at an abstract level intended to reflect what the user might think can be enabled or disabled within the store or site. Features can enable particular implementations of site components. By enabling certain features, the user has control over what site component implementations should be activated, influencing the flow of the site.
There can be a one-to-one or one-to-many mapping between a feature and a site component; in the latter case a single feature spans multiple site components. In fact, a feature is allowed not to refer to any site components at all: in this case, the feature is used simply to include or exclude portions of JSP pages. In Example 2-4, the MultipleShippingAddress feature is used to enable the MultipleShippingAddressPage implementation of the ShippingAddressPage virtual page while the SingleShippingAddress feature is used to enable the SingleShippingAddressPage implementation of the same virtual page.
Example 2-4 MultipleShippingAddress and SingleShippingAddress features
<virtual-page id="ShippingAddressPage"/>
<virtual-page-interface id="ShippingAddressPage.i1" virtual-page-id="ShippingAddressPage">
...
</virtual-page-interface>
<!-- SingleShippingAddressPage Implementation -->
<simple-implementation id="SingleShippingAddressPage.i1.impl" url="SingleShippingAddressView" virtual-page-interface-id="ShippingAddressPage.i1">
...
</simple-implementation>
<!-- MultipleShippingAddressPage Implementation -->
<simple-implementation id="MultipleShippingAddressPage.i1.impl" url="MultipleShippingAddressView" virtual-page-interface-id="ShippingAddressPage.i1">
...
</simple-implementation>
<feature id="MultipleShippingAddress" enables="MultipleShippingAddressPage.i1.impl"/>
<feature id="SingleShippingAddress" enables="SingleShippingAddressPage.i1.impl"/>
The description of all the configurable features for a given store or site is contained in the Features.xml file located in the store or site's repository directory. // Clear related topics
ibm.com/redbooks