Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-6150

isSuccessful() method of the WorkflowContext should return the state of the Workflow instead of boolean value.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.2
    • Fix Version/s: 3.5.0
    • Component/s: None
    • Labels:
      None
    • Release Notes:
      isSuccessful() method of the WorkflowContext is replaced by method getState() which returns the state of the workflow
    • Rank:
      1|hzze2v:

      Description

      Currently if there is any exception in the execution of the Workflow node, then the getContext().isSuccessful() returns false, otherwise (if its KILLED explicitly or COMPLETED) it returns true.

      However it makes sense to return the actual status of the Workflow (COMPLETED, KILLED, or FAILED) instead of boolean values.

      The API should be updated to something like this -
      WorkflowState getState();
      where WorkflowState is enum with values COMPLETED, KILLED, and FAILED.

        Attachments

          Activity

            People

            • Assignee:
              yaojie Yaojie Feng
              Reporter:
              sagar Sagar Kapare
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: