Appearance
Workflow node reference
The type of a node in a workflow definition is one of the ids below. Each type has its own config schema; the console editor shows the fields for the selected type, and validation rejects a config that does not match.
The getWorkflowSchema query returns the JSON Schema for workflow definitions. To find out what nodes.<id>.output will contain for a node, pass its type and config to resolveNodeOutputSchema:
graphql
mutation OutputSchema($config: JSON!) {
resolveNodeOutputSchema(input: { nodeType: "graphql", config: $config }) {
schema
resolution
diagnostics { message }
errors { path message }
}
}resolution says how the schema was worked out: INFERRED, INTROSPECTED, STATIC or PASSTHROUGH. PASSTHROUGH means the node outputs its input unchanged.
Unless a row says otherwise, a node has one input and one output (see Branching and joining).
Flow control
| Type | What it does |
|---|---|
condition | Evaluates a predicate and takes the true or false branch (label the outgoing edges "true" and "false"). Passes its input through. Fans out. |
switch | Evaluates cases in order and takes the branch of the first match, or the default branch. Each case name must match an outgoing edge's condition. Without a default, the node fails when no case matches. Fans out. |
logic | Combines several predicates with and, or, not, nand, nor, xor or xnor into one true / false branch. Outputs result and each operand's value. Fans out. |
split | Runs every outgoing branch in parallel. No config. Fans out. |
join | Waits for all live incoming branches (AND) and combines their outputs with the strategy keyed (default), merge or array. A failed branch triggers onPartialFailure: fail (default) or skip. Fans in. |
merge | Combines whichever incoming branches arrive (OR); a failed branch is dropped. Fans in. |
for_each | Runs an embedded body node once per item of items, sequentially or with maxConcurrency in parallel. Outputs results (one entry per item, in order) and count. |
delay | Waits for a configured duration, then passes its input through. |
Data
| Type | What it does |
|---|---|
transform | Builds a new object from a mapping of keys to expressions, literals or nested structures. |
set_variable | Sets workflow variables that any later node reads as variables.<name>. |
json_parse | Parses a JSON string, or encodes a value as JSON. |
csv_parse | Parses CSV into a list of objects, or encodes objects as CSV. |
yaml_parse | Parses a YAML string, or encodes a value as YAML. |
regex | Regular-expression match, extract, replace or split on a string. |
Checks and logging
| Type | What it does |
|---|---|
assert | Evaluates a predicate. If it fails, the workflow fails with the configured message, or, with softFail: true, outputs passed: false instead. |
log | Writes a message to the execution log and passes its input through. Levels: debug, info, warning, error. |
Platform
| Type | What it does |
|---|---|
graphql | Runs a GraphQL query or mutation against the CoCoCo API. The output's data has the shape of your selection set. |
microsql | Runs a MicroSQL query against the reporting engine. |
script | Runs a Lua script: a saved script by id or name, or inline code. |
custom_workflow_action | Runs a custom workflow action, a reusable Lua-backed action defined in your tenant. |
integration_action | Runs an action exported by an installed integration. |
ml_predict | Runs an ML model: features for tabular models, horizon / confidenceLevel for forecast models. |
producibility_audit | Runs a feasibility audit against a job's production plan using current progress data, and returns severity, findings and at-risk items. |
message | Sends a notification to a notification group or one recipient. Delivery is by email; recipients without an email channel are skipped. |
People and AI
| Type | What it does |
|---|---|
task | Creates a human task from a task definition and pauses the workflow (status WAITING) until someone completes or rejects it. Outputs the chosen outcome. |
agent | Sends a prompt to an AI agent for free-form processing. |
agent_task | Lets an AI agent resolve a task by choosing one of its outcomes, optionally falling back to a human task. |
HTTP and devices
| Type | What it does |
|---|---|
http_call | Sends an HTTP request to any URL allowed by the platform's HTTP policy. Outputs status, headers, body (a string: parse it with json_parse) and ok (true for 2xx). |
http_request | Sends an HTTP request to a device. |
sql_query | Runs a SQL query against a device's database. |
invoke_edge_app | Calls a function of an edge app installed on a controller. |
mqtt_publish | Publishes a message to MQTT. |
Files
These nodes work on Folders: named storage locations in your tenant. Each takes an optional Folder ID (folderId, or sourceFolderId / destinationFolderId for file_copy; without it, the tenant's default Folder is used) and a folder-relative path or key; .. is not allowed.
| Type | What it does |
|---|---|
file_read | Reads a file |
file_write | Writes a file |
file_check | Checks whether a file exists |
file_list | Lists files under an optional prefix. Set recursive: false to list one level only; controller folders always list one level. |
file_delete | Deletes a file |
file_copy | Copies a file to another Folder or within the same Folder |
file_wait | Pauses the workflow until a given file appears |
Folders in the CoCoCo cloud store, including the tenant's default Folder, do not support listing or deleting, so file_list and file_delete fail on them.
Prepress
| Type | What it does |
|---|---|
impose_plan | Runs the imposition engine and outputs the recommended plan as data. Nothing is stored. |
impose_pdf | Imposes source PDFs onto press sheets from a plan or saved imposition specs, and stores the print-ready PDF as a file. |
pdf_render | Renders one page of a PDF to an image. |
pdf_separations | Renders every ink plate of a PDF page (CMYK and spot colours) to greyscale PNGs, one file per colourant. |
pdf_preflight | Runs a preflight check on a component's artwork PDF and can store the report. |
The file-producing prepress nodes take an optional outputFolderId for where their files are stored.