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

Conditional Execution in Pipeline - Configuration design

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.0
    • Component/s: UI
    • Labels:
    • Sprint:
      UP6 Sprint 3
    • Rank:
      1|hzzwxa:zh

      Description

      As a user I would like to be able to specify multiple conditions for the conditional stage from its configuration panel:

      • When I add a new condition (or am prompted with my first condition), I only want to see the button for choosing whether I am getting the condition data from "Runtime Arguments" or "Nodes" (see next section for details). Each time I make a successive selection, I would like the next relevant option to appear.
      • I would like to be able to press a button that will add second, third, fourth, etc. condition
      • Between each condition, I would like to be able to toggle between a "And"/"Or" selection

      As a user, I would like to be able to specify the source of the condition for my conditional stage in the configuration panel:

      • I would like to be able to specify whether I want to condition on runtime arguments or statistics emitted by a previous stage
      • If I choose "Stage," I would like to specify which stage from a dropdown list of eligible stages. I only want to be allowed to select stages that come before the condition stage
      • If I choose "Runtime Arguments," I would like to specify the name of the runtime argument. I would like an error to be thrown at runtime if the runtime argument is not of type numeric

      As a user, if I choose "Stage" as the condition source, I would like to select one of the following statistics for my condition:

      • Number of output records, input records, or error records

      As a user, if I choose "Runtime Arguments," I would like to be able to specify my own argument name.

      As a user, I would like to be able specify condition on the numeric stage or runtime value:

      • A condition that is either greater than, less than, equal to, not equal to
      • A number that comes after this condition ("target value")

      As a user, I would like to be able to see metrics that explain the "decision" process that led up to the true/false evaluation of the pipeline:

      • For each condition I specified, I want to see the name of the node/statistic combination or runtime argument alongside the value on which the condition was evaluated. I would like the evaluation condition (>, <, ==, plus "target value") to be displayed here, too, and see whether the expression evaluated to true/false.
      • I would like to see whether the overall expression evaluated to true/false

      Design
      Use "Node" "FileSource."
      Evaluate to true if
      Value "Number of output records"
      is "Greater than" "10"

      Use "Runtime Arguments"
      Evaluate to true if
      Value "myRuntimeArgument"
      is "Greater than" "10"

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tbach Tony Bach
                Reporter:
                joe.farned Joe Farned
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: