# Workflow Configuration

The `workflow` plugin enables conditional execution of user-defined actions on client traffic based on specific rules, allowing granular API traffic management.<!-- --> <!-- -->Configuration covers plugin parameters.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* rules

  array\[object]

  required

  ***

  Rules evaluated in order. Only the first matching rule executes its action.

  * case

    array\[array]

    ***

    Matching conditions in the form of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions.md). If omitted, the rule always matches. Place an unconditional fallback last. In APISIX 3.19.0, invalid expressions are rejected during configuration validation.

  * actions

    array\[array]

    required

    ***

    An array of actions to be executed when a condition is successfully matched. Currently, the array only supports one action, and it should be either `return`, `limit-count`, or `limit-conn`. If you are using API7 Enterprise, you can also use `limit-count-advanced` as the action.

    Each action is a two-element array `[name, conf]`, where `name` is the action name and `conf` is its configuration object. Exactly one action is required per rule. This shape is enforced during configuration validation in APISIX 3.19.0 and by the control plane in API7 Enterprise 3.9.21 and 3.10.8. Actions without a configuration object, actions with extra elements, and rules with multiple actions are rejected.

    When the action is set to `return`, you can configure an HTTP status code to return to the client when the condition is matched.

    When the action is set to `limit-count`, you can configure all options of the [`limit-count`](https://docs.api7.ai/hub/limit-count/configuration.md) plugin, except for `group`.

    When the action is set to `limit-count-advanced`, you can configure all options of the [`limit-count-advanced`](https://docs.api7.ai/hub/limit-count-advanced/configuration.md) plugin, except for `group`.

    When the action is set to `limit-conn`, you can configure all options of the [`limit-conn`](https://docs.api7.ai/hub/limit-conn/configuration.md) plugin.
