VocalDocscontracts 1.65.0

Dry-run one node of a Workflow version

POST /v1/workflows/{workflow_id}/versions/{version}/nodes/{node_id}/evaluate

PropertyValue
Operationevaluate_workflow_node
GroupWorkflows
Scopeworkflows:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditNot audited: A dry run: it changes no state and reads no Call content, so it writes no Audit event (ADR 0012, workflows-and-processes.md section 9.8).
Released in1.59.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Evaluates one evaluate, condition, rule_table or transform node of a published version against sample input (1.59.0): the expression roots, which the node's input expressions read first, or the decision's input itself. It answers the evaluation, the outlet the node would take, the slots it would write and, on request, the engine's trace. Another node type is refused with validation_failed and workflow_node_not_evaluable; a node the version lacks is not found. It writes nothing.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the workflows:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/workflows/wfl_.../versions/1/nodes/<node_id>/evaluate" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
workflow_idpathWorkflowIdyesThe id of a Workflow: wfl_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
versionpathintegeryesA version number, from 1.
node_idpathWorkflowNodeIdyesA node id: a lower-case letter, then letters, digits and underscores, 64 at most; unique in the graph.
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: WorkflowNodeEvaluateRequest.

FieldTypeRequiredDescription
contextWorkflowNodeEvaluateContextInputno
inputmap of anynoThe decision's input itself, skipping the node's input expressions; an evaluate or rule_table node only.
tracebooleannoReturn the engine's trace; false when omitted.

Responses

StatusContent typeShapeError codes
200application/jsonWorkflowNodeEvaluateResult
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeidempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is WorkflowNodeEvaluateResult.

FieldTypeRequiredDescription
elapsed_usnumberyesThe evaluation time in microseconds, a measurement of this run.
engine_versionstringyes
evaluationWorkflowEvaluationyes
inputanyyesThe decision's input as evaluated, or the roots for a condition or transform: the sample, returned and never stored.
node_idMachineIdyes
node_typeone of "evaluate", "condition", "rule_table", "transform"yes
object"workflow_node_evaluation"yes
outcomeWorkflowNodeEvaluateOutcomeyes
outletWorkflowNameyesThe outlet the node would take.
setsmap of anyyesThe slots the node would write, with their values; empty when none.
tracearray or nullyesThe engine's trace when asked for; null otherwise.
versionintegeryes
workflow_idWorkflowIdyes