> For the complete documentation index, see [llms.txt](https://docs.linuxcontrolcenter.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.linuxcontrolcenter.com.br/workflow/create_workflow.md).

# Criar um Workflow

## Requisitos

* Linux Control Center = 2.10.X ou superior

## Overview

* O Workflow do Linux Control Center permite criar fluxos de trabalho com tomada de decisão e encadeamento de ações. Com uma interface intuitiva, ele possibilita controle total de forma simples e rápida.

## Objetivo

* Este documento tem como objetivo demonstrar o passo a passo e demonstrar como utilizar o Workflow do Linux Control Center.

## Fluxo de um Workflow

* Veja um exemplo de como funciona um fluxo de um Workflow com tomada de decisão.

  ![](/files/f7lsLkaWEBhZF0NMxdye)

## Criar um Workflow

1. Clique em **Workflow** no meu lateral esquerdo.

   ![](/files/e12Z2zvyI4vvBkZQNMpa)
2. Clique em **Create**.

   ![](/files/NAAcXSUEUFsKy20cUNuE)
3. Insira o nome para o Workflow no campo **Name**.

   ![](/files/xE33RJXnSSPEkQTyE4PJ)
4. Clique em **Start New Workflow**.

   ![](/files/sljxjxCkcV80jZokLW1w)
5. Escolha a *Ação* desejada no campo **Action**

   ![](/files/tR3JfPAvEpDr6Lbbq7m4)
6. Escolha o **Host** em que deseja executar a ação no campo **Host**.

   ![](/files/ceGF4taCegYpsNlrjZb6)
7. Também é possível executar a ação em um grupo, selecionando-o no campo **Group**.

   ![](/files/Mg6aoY0FhzRKZkVkLLVb)
8. Clique em **Create**.

   ![](/files/lTemwB8uJygr9Te1kswd)
9. Clique em **Save** para criar o *Workflow*.

   ![](/files/V6EI8ryO5W8KTunW1YQF)

## Criar Sub Action

1. Abra o Workflow em que deseja acrescentar uma *Ação* com tomada de decisão e clique em **Add Subaction** da ação desejada.

   ![](/files/KWduPa0KG5kPBEjSwZIv)
2. Clique em **Action** e escolha a *Sub Action*

   ![](/files/kEXgr9nOsnjm7w7fRmuS)
3. Escolha qual o resultado será responsável por executar a *Sub Action*.

   **Always**: Executa a *Sub Action* independente do resultado da *Ação* anterior.\
   **Success**: Executa a *Sub Action* somente em caso de *Sucesso* da *Ação* anterior.\
   **Error**: Executa a *Sub Action* somente em caso de *Error* da *Ação* anterior.\
   **Regex**: Executa a *Sub Action* somente se a *Expressão regular* definida for o resultado da *Ação* anterior.<br>

   ![](/files/NvCyMdLQ7sVAHRuMOfmJ)
4. Clique em **Create** para criar a *Sub Action*.

   ![](/files/4DsTJ6ZIqqEC8VMxv8ym)
5. Clique em **Save** para salvar a *Sub Action*

   ![](/files/5H7xbzE5r13deRvZULvQ)

## Execução do Workflow

1. Clique em **Workflow** no meu lateral esquerdo.

   ![](/files/e12Z2zvyI4vvBkZQNMpa)
2. Clique em **Actions** da linha do *Workflow* e clique em **Run**.

   ![](/files/kXiZaguPXdPLZPwJmdPD)
3. Também é possível executar dentro da página de um *Workflow*

   ![](/files/cX7Lct3IAleijTKv2PHt)
4. Clique em **Agree** para executar o *Workflow*

   ![](/files/JRyD81HtJuPm4t91iVYC)
5. Veja o exemplo do [Fluxo de um Workflow](#fluxo-de-um-workflow).

   ![](/files/qzkOma4JwYyDrKIVwSmv)


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.linuxcontrolcenter.com.br/workflow/create_workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
