Skip to content

Use a form

A published form is used in three places. In all three, the person answers it the same way, from their Tareas (Tasks) inbox, and the answer arrives in the same shape: the decision, the comment and the fields.

The task arrives in the Tareas inbox (and by email) of the person or role it is addressed to. When they open it, they see the context, the form with its sections and, at the bottom, the decisions. Rules and calculations work as they type, and before sending, fields that are missing or have an error are highlighted («Revisa los campos marcados», check the highlighted fields). Attachments upload as soon as they are chosen, and on a phone the person can use the camera.

In a Persona (Person) step on the canvas, Formulario (Form) section, Qué datos pide (What data it asks for):

  • Campos sueltos (Individual fields): a few simple fields defined in the step, as before. Convertir a formulario (Convert to form) moves them into a form without losing anything.
  • De la biblioteca (From the library): Elige un formulario publicado (Choose a published form) and its Versión (fija) (Pinned version). Cases always use that version; if you publish a newer one, the step tells you and you adopt it with Actualizar a v_N_ (Update to v_N_). Abrir en la biblioteca (Open in the library) takes you to the design. If the form is archived, the pinned version keeps working.
  • Diseñado aquí (Designed here): Diseñar aquí (Design here) opens the designer inside the step, for a form only this flow uses. Click Listo (Done) when you finish.

Then you connect the data:

  • Entradas ← datos del caso (Inputs ← case data): the value of each form input, with {{variable}} or by choosing Usar una variable del caso… (Use a case variable…).
  • Salida → variable (Output → variable): the variable that holds the answer (decision, comment and fields). The following steps read it; for example, a gateway can compare aprobacion.fields.total.

When validating, the canvas warns you, among other things, if a gateway reads a field that may not arrive (because it has a visibility rule), if a sensitive form value ends up in an AI step or copied to a variable, or if the form is too large for the case.

If your plan does not include forms, the step uses individual fields.

In an AI assistant there are two ways to ask for an approval with a form:

  • Flow mode: the Aprobación (Approval) node has Formulario que completa quien decide (Form filled in by the decision maker): Sin formulario: campos sueltos (No form: individual fields), a form from the library (with its version) or one designed in the node. With a form, the node gets an error output, in case the task could not be created. The answer is stored in the node’s variables (the decision, _comentario and one _campo per field).
  • Agent mode: under Atención humana → Pedir aprobación (Human attention → Request approval), choose the form and the Opciones de decisión (separadas por coma) (Decision options, comma separated; Aprobar, Rechazar by default). With a form, the model no longer makes up fields or options: it provides the data the form asks for and the decision maker completes it. In the task, that data shows as Dato aportado por el asistente (Provided by the assistant).

The form version is pinned when the assistant is published. Sensitive data never reaches the model: the AI sees [dato sensible].

A robot creates the task with Create Human Task (Human Tasks package 1.3.0 or later):

ParameterWhat you set
formThe form’s name. In the Designer, when you are signed in, you pick it from the list of the environment’s published forms.
formVersionOptional. Empty = the current version when each task is created. Pin it so a form change does not affect the robot.
formInputsThe values of the form’s inputs (input → value).
optionsThe decisions. They must include every decision the form’s rules use.

The answer arrives in fields, through Wait for Human Task or in the inputs of the onCompleteProcess process: tables as lists of rows, each with all of its columns, and files as references. Anything left blank arrives as null (answer format). To download the files to a folder, use Download Human Task File.

Create Human Task title = "Revisar gastos de viaje de " + empleado
form = "Legalización de gastos"
formInputs = { "empleado": = empleado, "anticipo": = valor_anticipo }
assignRole = "contabilidad" reference = "gastos-" + id_viaje
→ output: tarea
Wait for Human Task taskId = tarea["id"] → output: resultado
Download Human Task File taskId = tarea["id"] field = "gastos.soporte"
destination = "C:\\Gastos\\Soportes" → output: archivos

For batches, with a queue. If there are many decisions, set queueName in Create Human Task: besides the task, a queue item is created that waits for the answer, and a single performer processes everything that was decided (see Human decisions in batches). The form is checked before the item is created. Add Queue Item can also ask for a decision, but only with individual fields.

Your own application can also create tasks with a form from the library or with its own form. See the API reference.