class PollExecuteAppStatusExecution implements AsyncExecution {

    @Override
    public AsyncExecutionState execute(ProcessContext context) {
        List<ApplicationStateAction> actions = context.getVariable(Variables.APP_STATE_ACTIONS_TO_EXECUTE);
        if (!actions.contains(ApplicationStateAction.EXECUTE)) {
            return AsyncExecutionState.FINISHED;
        }

        CloudApplication app = getNextApp(context);
        CloudControllerClient client = context.getControllerClient();
        ApplicationAttributes appAttributes = ApplicationAttributes.fromApplication(app);
        AppExecutionDetailedStatus status = getAppExecutionStatus(context, client, appAttributes, app);
        ProcessLoggerProvider processLoggerProvider = context.getStepLogger()
                                                             .getProcessLoggerProvider();
        StepsUtil.saveAppLogs(context, client, recentLogsRetriever, app, LOGGER, processLoggerProvider);
        return checkAppExecutionStatus(context, client, app, appAttributes, status);

    }

    public  PollExecuteAppStatusExecution(RecentLogsRetriever recentLogsRetriever);

}