Steps and functions
Every step runs one function. This is the catalog that comes with CodeKasten (the Core Workflows package).
Triggers
A workflow has exactly one.
| Function | Starts the workflow |
|---|---|
| Entity Trigger | When a record of a type is added, changed or deleted. Its output event is the record |
| Schedule Trigger | On a schedule: an interval or a cron expression, with a time zone, start and end, and what to do when runs overlap |
| Manual Trigger | When somebody clicks Run now, or an agent runs it |
| Connector Trigger | When a connector receives a webhook |
| On Signal | Not a start: a handler that runs when the workflow receives a signal |
Records
| Function | Does |
|---|---|
| Get Entity | Reads a record |
| Create Entity, Update Entity, Delete Entity | Change records, by the field names the type defines |
| Get Relations | Reads what a record is linked to |
| Query Entities | Not implemented yet |
Telling people
| Function | Does |
|---|---|
| Send to Inbox | Puts an item in people's Inbox: To (usernames, e-mails or people), Title, Message, an optional Record that opening the item goes to, and an optional Key |
Only members of the workspace are told; anybody else is reported as skipped. With a key, there is one item per person and key, made unread again each time; without one, one item per run.
| Function | Does |
|---|---|
| Run Report | Counts and adds up records: Report - the name or id of a report of the branch the automation is on - or a Question written out as JSON (the one /api/query takes), and an optional Timezone |
The numbers are the ones the Reports page shows. A later step reads them from the step's output: {{steps.<step>.output.text}} is the answer in lines ("In progress: 3", ..., "Total: 10"), ready to be the Message of Send to Inbox; .total holds the measures over everything and .rows a row per group. On a schedule trigger, the two steps together are a report that arrives in people's Inbox every morning.
Control
| Function | Does |
|---|---|
| Switch | Takes one of several paths by rules on a value, or a default |
| Delay | Waits. The wait survives a restart of the engine |
| For Each, For Each Step | Run a workflow, or one step, once per item of a list |
| Wait, Signal Workflow | Wait for a signal; send one to another run |
| Execute Workflow | Runs another workflow as a child and gets its result |
| Report Progress | Reports where a long run is |
| End, Return | End the run; Return also hands a value back to a parent workflow |
Values
| Function | Does |
|---|---|
| Set Fields | Builds an object from a schema and values, or changes one |
| Function, Change, Template | Not implemented yet |
Versioning
Branch operations as steps: Create branch, Checkout, Commit, Branch status, Merge, Close branch. They act in the instance's own workspace, and report a repeated step as an outcome (exists, nothing_to_commit, up_to_date) instead of failing. A merge with conflicts is aborted and reported as conflicts.
Packages and instances
Install package installs a release on a branch. Create workflow instance switches a workflow on. Solutions use both.
Connectors
Connector Action calls an action of an installed connector with one of its linked accounts. See Connectors and webhooks.
AI
AI Generate, AI Extract, AI Classify and AI Agent are in the catalog but not implemented yet.
Not implemented yet
A step whose function is marked not implemented yet runs without error and does nothing: it logs and passes on. Throw Error is in the same state and does not stop a run. Do not build on them yet.
There is no "run SQL" step
Deliberately. Workflows act through records, relations and branches, where the rules of the workspace apply.