} else {
actionExecutionHelper.addExecutionCommandsToStage(actionExecContext, stage, params);
}
RoleCommandOrder rco = this.getRoleCommandOrder(cluster);
RoleGraph rg = new RoleGraph(rco);
rg.build(stage);
List<Stage> stages = rg.getStages();
if (stages != null && !stages.isEmpty()) {
actionManager.sendActions(stages, actionRequest);
return getRequestStatusResponse(stage.getRequestId());
} else {
throw new AmbariException("Stage was not created");