---
search:
  exclude: true
---

# <a id="bitdrift.public.unary.workflows.v1.Flow"></a>Flow

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L113-L139`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L113-L139>)

An individual flow within a workflow.

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| steps | <span class="proto-type proto-type-message">array of [<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">Step</i>](bitdrift_public_unary_workflows_v1_Step.md "bitdrift.public.unary.workflows.v1.Step")</span><br><em class="proto-field-annotation">between 1 and 100 items</em> | The steps that make up this flow. |
| exclusive | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">Flow</i><i class="proto-type-dot">.</i><i class="proto-type-part">ExclusiveFlow</i>](#bitdrift.public.unary.workflows.v1.Flow.ExclusiveFlow "bitdrift.public.unary.workflows.v1.Flow.ExclusiveFlow")</span><span class="proto-field-annotation">(Only one of <em>exclusive</em>, or <em>parallel</em> can be set)</span> | Any match on the initial step causes the flow to reset. This is the default if not  specified. |
| parallel | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">Flow</i><i class="proto-type-dot">.</i><i class="proto-type-part">ParallelFlow</i>](#bitdrift.public.unary.workflows.v1.Flow.ParallelFlow "bitdrift.public.unary.workflows.v1.Flow.ParallelFlow")</span><span class="proto-field-annotation">(Only one of <em>parallel</em>, or <em>exclusive</em> can be set)</span> | Multiple "runs" of the flow can occur in parallel. Runs are replaced FIFO if the active  runs exceeds max_active_runs. A new run that matches and extracts the same field values  on the initial step as an existing active run will replace the existing run. This  execution mode is primarily used for flows that correlate on a specific field value. |

</section>
#### Example
```json
{
  "exclusive": {},
  "steps": [
    {
      "exit_conditions": [
        {
          "match_rule": {
            "generic_match": {
              "base_matcher": {
                "log_field": "field_name",
                "operator": "EQUAL",
                "string_value": "example"
              }
            },
            "match_id": "_i1yUnHjKfmWpCaD5Tazo",
            "sample_rate": 100
          }
        }
      ],
      "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
      "match_rule": {
        "generic_match": {
          "base_matcher": {
            "log_field": "field_name",
            "operator": "EQUAL",
            "string_value": "example"
          }
        },
        "match_id": "_i1yUnHjKfmWpCaD5Tazo",
        "sample_rate": 100
      },
      "save_fields": [
        {
          "field_name": "",
          "id": "",
          "regex_capture": ""
        }
      ]
    }
  ]
}
```

# <a id="bitdrift.public.unary.workflows.v1.Flow.ExclusiveFlow"></a>Flow.ExclusiveFlow

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L114-L115`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L114-L115>)

No fields

# <a id="bitdrift.public.unary.workflows.v1.Flow.ParallelFlow"></a>Flow.ParallelFlow

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L117-L120`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L117-L120>)

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| max_active_runs | <span class="proto-type proto-type-primitive">optional uint32</span> | The maximum number of active "runs" for this flow. Defaults to 10 if not specified. |

</section>
#### Example
```json
{
  "max_active_runs": 1
}
```

