-
Bug
-
Resolution: Done
-
Minor
-
2.0.0.Alpha4
-
None
AbstractAddStepHandler.recordCapabilitiesAndRequirements(...) has this:
ModelNode model = resource.getModel();
for (AttributeDefinition ad : attributes) {
if (model.hasDefined(ad.getName())) {
ad.addCapabilityRequirements(context, model.get(ad.getName()));
}
}
That 'if' check removes the opportunity for an AD to register a requirement based on the default value of the attribute.
SimpleAttributeDefinition includes logic for doing that, so not giving it a chance to execute is inconsistent. AbstractWriteAttributeHandler also doesn't include any such limitation.