> For the complete documentation index, see [llms.txt](https://docs.conanjs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.conanjs.io/api/main-classes/conanflow/userflowdef.md).

# UserFlowDef

This interface allows defining a ConanFlow.

| Property         | Description                                                                                                                                                                         |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name             | <p><strong>Type:</strong>  <code>string </code><em><code>required</code></em></p><p>the name of the flow</p>                                                                        |
| statuses         | <p><strong>Type:</strong>  <code>UserFlowStatusesDef\<STATUSES, MUTATORS> </code><em><code>required</code></em></p><p><code>The statuses definition this flow will have</code></p>  |
| initialStatus    | <p><strong>Type:</strong>  <code>AsapLike\<StatusLike\<STATUSES>> </code><em><code>optional</code></em></p><p><code>The initial status to start with</code></p>                     |
| actions          | <p><strong>Type:</strong>  <code>FlowActionsDef\<STATUSES, MUTATORS, ACTIONS> </code><em><code>optional</code></em></p><p>The actions this flow will execute</p>                    |
| $onInit          | <p><strong>Type:</strong>  <code>ReactionCb\<STATUSES, any> \[] </code><em><code>optional</code></em></p><p>The array of reactions to execute when the ConanFlow is initialised</p> |
| $onStop          | <p><strong>Type:</strong>  <code>ReactionCb\<STATUSES, any> \[] </code><em><code>optional</code></em></p><p>The array of reactions to execute when the ConanFlow is stopped</p>     |
| pipelineListener | <p><strong>Type:</strong>  <code>IConsumer\<FlowEvent> </code><em><code>optional</code></em></p><p>A listener can be attached to flow events</p>                                    |
| loggingRule      | <p><strong>Type:</strong>  <code>Rule\<FlowEvent> </code><em><code>optional</code></em></p><p>the default logging policy can be overridden by passing a custom Rule</p>             |
| nature           | <p><strong>Type:</strong>  <code>FlowEventNature </code><em><code>optional</code></em></p><p><strong>TBC: Alberto qué coño es esto</strong></p>                                     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.conanjs.io/api/main-classes/conanflow/userflowdef.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
