code: public static String[] getFinalizeFlowReasons(final String reason, final Throwable
        originalError) {
      final List<String> reasons = new LinkedList<>();
      reasons.add(reason);
      if (originalError != null) {
        reasons.add(ExceptionUtils.getStackTrace(originalError));
      }
      return reasons.toArray(new String[reasons.size()]);
    }
docs: Get the reasons to finalize the flow.
  
  @param reason the reason
  @param originalError the original error
  @return the reasons to finalize the flow