Best way to get Execution within a Incident Handler?

Looking for the best way to get the Execution when using a custom incident handler


Based on the IncidentEntity class it seems to be something such as:

  public ExecutionEntity getExecution() {
    if(executionId != null) {
      ExecutionEntity execution = Context.getCommandContext()

      if (execution == null) {

      return execution;
    else {
      return null;