}
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
STEPS.validateOperation(operation);
ImmutableManagementResourceRegistration registry = context.getResourceRegistration();
final List<ModelNode> list = operation.get(ModelDescriptionConstants.STEPS).asList();
final ModelNode responseMap = context.getResult().setEmptyObject();
Map<String, OperationStepHandler> stepHandlerMap = new HashMap<String, OperationStepHandler>();
final int size = list.size();
// Validate all needed handlers are available.
for (int i = 0; i < size; i++) {
String stepName = "step-" + (i+1);
// This makes the result steps appear in the correct order
responseMap.get(stepName);
final ModelNode subOperation = list.get(i);
PathAddress stepAddress = PathAddress.pathAddress(subOperation.get(OP_ADDR));
String stepOpName = subOperation.require(OP).asString();
OperationStepHandler stepHandler = registry.getOperationHandler(stepAddress, stepOpName);
if (stepHandler == null) {
ImmutableManagementResourceRegistration child = registry.getSubModel(stepAddress);
if (child == null) {
context.getFailureDescription().set(MESSAGES.noSuchResourceType(stepAddress));
} else {
context.getFailureDescription().set(MESSAGES.noHandlerForOperation(stepOpName, stepAddress));
}