Uploaded image for project: 'FlightPath'
  1. FlightPath
  2. FLPATH-404

Consider exception added to WorkReport in case of a failed execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • v1.0.16
    • None
    • parodos-backend
    • None

      When workflow execution fails and returns a failed response (from the workflow itself) , the returned exception as part of the report is silently ignored.
      The following snippet exemplifies the code from an arbitrary workflow that returns a RuntimeException. However, that exception is being ignored and not logged.

      catch (Exception e) {
      return new DefaultWorkReport(WorkStatus.FAILED, workContext,
      new RuntimeException("some error", e));
      }

       The same goes for the returned response to a task.
      Following the code started from here will show the WorkReport.getError() is never considered.
      There is a difference in the behavior between a workflow that fails by throwing an exception to a workflow that failed by adding an exception to the work-report for which the post-processing will be invoked.
       
      The exception can also be added to the task-logs using the new API being added in this PR:
      https://github.com/parodos-dev/parodos/pull/368

            rh-ee-gfarache Gabriel Farache
            masayag@redhat.com Moti Asayag
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: