###### Extending feature groups by including features indirectly

[[fg-indirect-ext]]While the list of the feature group spec enrties (features and feature groups) is fixed and cannot be extended, new features and feature groups can be added as children of the features that have already been included into the feature group.
Let's edit the example from the previous paragraph to demonstrate that. The feature specs will remain the same.
[source,xml]
----
<feature-spec xmlns="urn:wildfly:pm-feature-spec:1.0" name="featureP">
  <params>
    <param name="parent" feature-id="true"/>
  </params>
</feature-spec>
----

[source,xml]
----
<feature-spec xmlns="urn:wildfly:pm-feature-spec:1.0" name="featureC">
  <refs>
    <ref feature="featureP">
  </refs>
  <params>
    <param name="parent" feature-id="true"/>
    <param name="child" feature-id="true"/>
    <param name="a"/>
    <param name="b"/>
  </params>
</feature-spec>
----

The group spec will now include only parent feature
[source,xml]
----
<feature-group-spec name="group1" xmlns="urn:wildfly:pm-feature-group:1.0">
  <feature spec="featureP">
    <param name="parent" value="p1"/>
  </feature>
</feature-group-spec>
----

And now we will include the child feature as a configuration customization of the parent feature.
[source,xml]
----
<config>
  <feature-group name="group1">
    <include feature-id="featureP:parent=p1">
      <feature spec="featureC">
        <param name="child" value="c1"/>
        <param name="a" value="config"/>
        <param name="b" value="config"/>
      </feature>
    </include>
  </feature-group>
</config>
----

The resolved configuration will contain the two features:

[%header,options="autowidth"]
|===
|Feature spec |parent
|featureP |p1
|===

[%header,options="autowidth"]
|===
|Feature spec |parent |child |a |b
|featureC |p1 |c1 |config |config
|===

