- Introdução
- Introdução
- Modelagem de processos com BPMN
- Noções Básicas sobre Modelagem de Processos
- Abertura da tela de modelagem
- Modelagem de seu processo
- Alinhamento e conexão de elementos BPMN
- Autopilot para Maestro (visualização)
- Repositório de processos
- Modelagem de processos com o Gerenciamento de casos
- Criação de um esquema de entidade de caso persistente
- Definição de chaves de caso (sistema versus externo)
- Estabelecimento de contratos de E/S de tarefa e Write-back
- Regras de saída e encerramento do estágio inicial
- Modelagem de estágios primários e secundários
- Acionamento de um caso a partir do Data Fabric
- Implementação de personas e permissões no nível do estágio
- Definição de SLAs e regras de escalonamento automatizados
- Configuração de um loop de retrabalho (reentrada)
- Gerenciamento de instâncias de casos ao vivo: pausar, migrar e tentar novamente
- Dicionário de componentes de gerenciamento de casos do Maestro
- Process modeling with Flow
- Introdução
- Conceitos básicos
- Node reference
- Built-in nodes
- Connector nodes
- Build guides
- Melhores práticas
- Referência
- Sintaxe de expressão
- Business Process Model and Notation (BPMN) concept mapping
- Implementação de processos
- Depuração
- Simulação
- Publicação e atualização de processos agênticos
- Cenários de implementação comuns
- Extração e validação de documentos
- Operações do processo
- Monitoramento de processo
- Otimização de processos
- Informações de referência
Guia do usuário do Maestro
Flow expressions are JavaScript. They reference variables with the $vars prefix and compute values in configuration fields, Decision and Switch conditions, and Script code.
For how data moves between nodes and the variables model in depth, see Variables and data flow.
Variable references
Every value you reference lives under $vars:
$vars.httpRequest1.output.body // node output
$vars.orderTotal // variable
$vars.manualTrigger1.output.userId // trigger input
$vars.httpRequest1.output.body // node output
$vars.orderTotal // variable
$vars.manualTrigger1.output.userId // trigger input
- Node output:
$vars.<nodeName>.output. Every node exposes its result under.output. The shape of that object depends on the node, so see each node's reference page for its output fields. - Variables:
$vars.<name>. - Trigger inputs:
$vars.<triggerName>.output.<inputName>.
For nested properties use dot notation; for array elements use bracket notation:
$vars.httpRequest1.output.body.customer.email
$vars.httpRequest1.output.body.items[0].id
$vars.httpRequest1.output.body.customer.email
$vars.httpRequest1.output.body.items[0].id
Where you write expressions
Flow has two modes, depending on the field:
Literal (text) fields — embed an expression in surrounding text with double curly braces. Use this only where prompt or templated text is expected:
https://api.example.com/users/{{ $vars.manualTrigger1.output.userId }}
https://api.example.com/users/{{ $vars.manualTrigger1.output.userId }}
Expression fields (Decision and Switch conditions, the Update Variable section) and Script code — write the expression directly, with no braces:
$vars.httpRequest1.output.statusCode === 200
$vars.httpRequest1.output.statusCode === 200
Operadores
Standard JavaScript operators are supported:
| Operador | Exemplo | Resultado |
|---|---|---|
| Igualdade | $vars.status === "active" | true ou false |
| Desigualdade | $vars.count !== 0 | true ou false |
| Comparação | $vars.price > 100 | true ou false |
| Logical AND | $vars.isVerified && $vars.isActive | true ou false |
| Logical OR | $vars.role === "admin" || $vars.role === "owner" | true ou false |
| Ternary | $vars.count > 0 ? "has items" : "empty" | String |
String operations
"Hello, " + $vars.firstName
$vars.message.toUpperCase()
$vars.email.includes("@uipath.com")
"Hello, " + $vars.firstName
$vars.message.toUpperCase()
$vars.email.includes("@uipath.com")
Template literals combine variables and static text:
`Hello ${firstName}, your order #${orderId} has shipped.`
`Hello ${firstName}, your order #${orderId} has shipped.`
Optional chaining
Use ?. to safely access properties that may be undefined:
$vars.httpRequest1.output.body?.items?.[0]?.id
$vars.httpRequest1.output.body?.items?.[0]?.id
Returns undefined instead of raising a runtime error if any intermediate property is null or undefined.
Nullish coalescing
Use ?? to provide a default value when a value is null or undefined:
$vars.userName ?? "Anonymous"
$vars.userName ?? "Anonymous"
Common errors
| Problema | Causa | O que fazer |
|---|---|---|
An expression resolves to undefined | You referenced a node's output before that node runs, or a field that doesn't exist on the output | Reference output only from upstream nodes; check the node's reference page for its actual output fields. Use optional chaining (?.) for properties that may be missing. |
| A Decision or Switch condition behaves unexpectedly or fails | The condition isn't a bare boolean expression, for example, it's written as a return statement | Write a plain expression that resolves to true or false, for example $vars.order1.output.total > 1000. Do not use return. |
Cannot find name '$vars' (ou '$self' ) | The variable isn't in scope at this node, or $self is used on a node that produces no output of its own | Reference only variables shown in the variable picker for that node. $vars resolves to in-scope variables only; $self is available only on nodes that produce output. |
| A value from another node isn't available to reference | Scope is upstream-only — a node can't see downstream nodes, sibling-branch nodes, or nodes inside a loop it has already exited | Restructure so the producing node is upstream of where you reference it, or carry the value through a variable that's in scope. |
$vars.<node>.error isn't available | A node's error output is in scope only when error handling is enabled on it (or its error path is connected) | Enable error handling on the node, or connect its error handle, then reference $vars.<node>.error. |
{{ }} shows as literal text, or a text field doesn't resolve | Mode mismatch: {{ }} works only in literal (text) fields | Use {{ $vars.x }} only in plain-text fields; in expression fields and in Decision and Switch conditions, write $vars.x directly with no braces. |
Decision and Switch conditions run as expressions at runtime. A return statement is valid only in Script node code.
Observações
- Expressions are evaluated at runtime, not at design time. Syntax errors surface when the node executes.
- An expression in a configuration field must resolve to the type that field expects — a condition field must resolve to
trueorfalse. - The
=and=js:prefixes you may see in a.flowfile are internal serialization formats. You never type them in the editor. - Type checking is best-effort. References into loosely-typed outputs (objects or arrays typed as
any) aren't fully validated, so a typo in a nested field name can pass without a warning — double-check nested paths against the node's output.