Add Flag Prerequisites

Updated 4 months ago by Archana Singh

This topic describes how to use feature flag prerequisites to enable or disable features based on different flag states.

Prerequisites allow you to add a flag as a dependency to enable a feature. You can add any other existing flags from your environment as a prerequisite. When you add a flag prerequisite, the state of a flag will not come into an effect unless the prerequisites are met.

For example, you have two flags that control read and write access in your Java code, Read Java and Write Java. If you do not have read access to your codebase, you will not be able to view the code, hence will not be able to write to it.

You can set Read Java as a prerequisite to Write Java flag. When evaluating the Write Java flag, Harnes Feature Flag will ensure that the Read Java flag is On and the user is seeing the true variation.

Before You Begin

Step: Add Prerequisites

Perform the following steps to add flag prerequisites:

  1. Click on the feature flag for which you want to add the prerequisites.
  2. Expand Prerequisites(what’s required before enabling flags) and click Prerequisites.
  3. In Add Prerequisites, click Prerequisites.
  4. Select a flag and variation from the drop-down list and click Save.
    The added prerequisite is listed.


Please Provide Feedback