class LongRunningProcessStartTask extends LongRunningProcessTask<List<UUID>> {

    @Override public List<UUID> call() {
        ArrayList<UUID> res = new ArrayList<>();

        try {
            for (LongRunningProcess proc : processes) {
                Future<?> fut = runTask(proc.getTask());

                UUID procId = saveProcMetadata(fut);

                res.add(procId);
            }
        }
        catch (Exception e) {
            // All-or-nothing strategy. In case of exception already started processes will be stopped.
            stopAllProcessesAndClearMetadata(res);

            throw e;
        }

        return res;
    }

    public  LongRunningProcessStartTask(List<LongRunningProcess> processes);

}