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

Allow adding configurable conditions in the Workflow.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: CDAP, Workflow
    • Labels:
      None
    • Release Notes:
      Workflow now allows adding configurable conditions with the lifecycle methods.
    • Rank:
      1|i006kf:

      Description

      We need ability to support the configurable conditions in the Workflow. These conditions will also have lifecycle methods similar to other actions.

      New API for condition would look like

      /**
       * Defines configurable condition in the Workflow.
       */
      public interface Condition extends ProgramLifecycle<WorkflowContext>, Predicate<WorkflowContext> {
        /**
         * Configures the condition.
         * @param configurer the {@link ConditionConfigurer} used to configure the condition.
         */
        void configure(ConditionConfigurer configurer);
      }
      

      Workflow configurer will now support adding Condition object through following API

      /**
         * Adds a condition to the {@link Workflow}.
         * @param condition the {@link Condition} to be evaluated
         * @return the configurer for the condition
         */
        WorkflowConditionConfigurer<? extends WorkflowConfigurer> condition(Condition condition);
      

        Attachments

          Activity

            People

            • Assignee:
              sagar Sagar Kapare
              Reporter:
              sagar Sagar Kapare
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: