protected CompletableFuture<List<EventExecution>> executeActionsForEventHandler(
            EventHandler eventHandler, Message msg) {
        List<CompletableFuture<EventExecution>> futuresList = new ArrayList<>();
        int i = 0;
        for (Action action : eventHandler.getActions()) {
            String id = msg.getId() + "_" + i++;
            EventExecution eventExecution = new EventExecution(id, msg.getId());
            eventExecution.setCreated(System.currentTimeMillis());
            eventExecution.setEvent(eventHandler.getEvent());
            eventExecution.setName(eventHandler.getName());
            eventExecution.setAction(action.getAction());
            eventExecution.setStatus(Status.IN_PROGRESS);
            if (executionService.addEventExecution(eventExecution)) {
                futuresList.add(
                        CompletableFuture.supplyAsync(
                                () ->
                                        execute(
                                                eventExecution,
                                                action,
                                                getPayloadObject(msg.getPayload())),
                                eventActionExecutorService));
            } else {
                LOGGER.warn("Duplicate delivery/execution of message: {}", msg.getId());
            }
        }
        return CompletableFutures.allAsList(futuresList);
    }
@param eventHandler the {@link EventHandler} for which the actions are to be executed
@param msg the {@link Message} that triggered the event
@return a {@link CompletableFuture} holding a list of {@link EventExecution}s for the {@link
    Action}s executed in the event handler
core/src/main/java/com/netflix/conductor/core/events/DefaultEventProcessor.java