for (String step : steps) {
if (result.hasDefined(step)) {
// Get the result for this step
final ModelNode stepResult = result.get(step);
final boolean isRolledBack = (stepResult.hasDefined(ROLLED_BACK) && stepResult.get(ROLLED_BACK).asBoolean());
final UpdateFailedException updateFailedException;
// Create the failure description
if (stepResult.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) {
updateFailedException = new UpdateFailedException(stepResult.get(ClientConstants.FAILURE_DESCRIPTION).asString());
} else if (planResultNode.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) {
updateFailedException = new UpdateFailedException(planResultNode.get(ClientConstants.FAILURE_DESCRIPTION).asString());
} else {
updateFailedException = new UpdateFailedException(ControllerClientMessages.MESSAGES.noFailureDetails());
}
final BasicDomainUpdateResult domainUpdateResult;
if (isDomainFailure) {
domainUpdateResult = new BasicDomainUpdateResult(updateFailedException, isRolledBack);
} else if (isHostFailure) {