Reference & Data Model
Workflow definition (workflow_definition)
The workflow definition is the header of an automation: name, owner and the versions of its rules document.
Purpose
Section titled “Purpose”A workflow is a rules document (version 3): a trigger (on), optionally a global condition (when), a list of rules with CEL expressions or calls (e.g. db.task.insert) and optionally a return value (return). The workflow definition is its header: name, description and owner. The document itself is stored, versioned, in the Workflow deployment. (Data type: configuration)
Where in the app
Section titled “Where in the app”No page of its own, no graphical editor. Workflows are created and changed in a conversation with Polaris: Polaris reads a workflow (workflow_get; RPC workflow_v3_read), writes the whole document and saves it (workflow_save; RPC workflow_v3_upsert). Runs appear in the Executions. See Guides › Workflows.
Fields
Section titled “Fields”| Field | Technical | Type | Required | Meaning | Notes |
|---|---|---|---|---|---|
| Name | name |
Text | yes | display name | – |
| Description | description |
Text | no | free text | – |
| Owner | owner_principal_id |
Reference | – | person who owns the workflow | System; changed only through the workflow functions |
| Chat run | conversation_run_id |
Text | no | only on one-off workflows from a chat (workflow_run) |
System |
Relations
Section titled “Relations”| Related to | Kind | Required | On delete |
|---|---|---|---|
| Workflow deployment | has many (versions) | yes | deleted along |
| Trigger | has many (one per version) | no | kept |
| Execution | has many (reference as text) | no | kept; runs then show only the ID |
Rules & automation
Section titled “Rules & automation”- A new workflow starts disabled; the person who creates it is the owner.
- When the owner saves, the new version becomes active immediately. When Polaris saves an enabled workflow for its owner, or another admin saves, a proposed version (
proposed) is created, which the owner or an admin accepts (workflow_v3_accept). - Enabling and disabling (
workflow_v3_set_enabled) switches the trigger of the active version. An admin who is not the owner becomes the owner by enabling or accepting. Polaris can neither enable nor accept.
See also
Section titled “See also”Workflow deployment · Trigger · Execution · Chapter 12 System logic