-
Bug
-
Resolution: Done
-
Major
-
8.0.0.CR1
-
None
Imagine a scenario like the following:
```
parent.addChildResource(RemotingEndpointResource.ENDPOINT_PATH)
.getAttributeBuilder()
.setDiscard(DiscardAttributeChecker.UNDEFINED, RemotingEndpointResource.ATTRIBUTES)
.addRejectCheck(RejectAttributeChecker.DEFINED, RemotingEndpointResource.ATTRIBUTES.toArray(new AttributeDefinition[RemotingEndpointResource.ATTRIBUTES.size()]))
.end() .addOperationTransformationOverride(ModelDescriptionConstants.ADD)
.inheritResourceAttributeDefinitions() .setCustomOperationTransformer(OperationTransformer.DISCARD)
.end()
```
The idea is to discard "add" if any parameter is defined, reject otherwise. The legacy slave can ignore the whole resource if it isn't really configured by the user, but any detail config by the user must result in failure.
Problem is AttributeTransformationRule will do a "reject" when it gets a prepared response from the slave, but using setCustomOperationTransformer(OperationTransformer.DISCARD) means the op will be discarded, so there will be no prepared response and thus no rejection.
Solution is to have AttributeTransformationRule register a OperationResultTransformer that deals with this situation.