public void handle (TaskExecution aTask) {
    CountDownLatch latch = new CountDownLatch(1);
    Future<?> future = executors.submit(() -> {
      try {
        eventPublisher.publishEvent(PiperEvent.of(Events.TASK_STARTED,"taskId",aTask.getId(),"jobId",aTask.getJobId()));
        SimpleTaskExecution completion = doExecuteTask(aTask);
        messageBroker.send(Queues.COMPLETIONS, completion);
      }
      catch (InterruptedException e) {
        // ignore
      }
      catch (Exception e) {
        TaskExecutionFuture<?> myFuture = taskExecutions.get(aTask.getId());
        if(myFuture == null || !myFuture.isCancelled()) {
          handleException(aTask, e);
        }
      }
      finally {
        latch.countDown();
      }
    });
    
    taskExecutions.put(aTask.getId(), new TaskExecutionFuture<>(aTask,future));
    
    try {
      future.get(calculateTimeout(aTask), TimeUnit.MILLISECONDS);
    } catch (InterruptedException | ExecutionException | TimeoutException e) {
      handleException(aTask, e);
    }
    catch (CancellationException e) {
      logger.debug("Cancelled task: {}", aTask.getId());
    }
    finally {
      try {
        latch.await();
      } catch (InterruptedException e) {
        handleException(aTask, e);
      }
      taskExecutions.remove(aTask.getId());
    }
    
  }
Handle the execution of a {@link TaskExecution}. Implementors
are expected to execute the task asynchronously. 

@param aTask
         The task to execute.
@throws InterruptedException
src/main/java/com/creactiviti/piper/core/Worker.java