Workflow Engine¶
Trustpoint workflows automate decisions around devices, certificates, and enrollment requests. They can notify operators, call external systems, pause an enrollment for approval, or intentionally end a request as approved, rejected, timed out, stopped, or finished.
Workflows are YAML-first. The interactive editor provides a YAML editor, graph view, and structured controls, but the YAML remains the source of truth.
Warning
The workflow engine is part of the Trustpoint technology preview. Review workflows carefully before using them for security-sensitive automation.
Mental Model¶
A workflow definition has five important parts:
triggerSelects the event that starts the workflow, for example
device.createdorest.simpleenroll.trigger.sourcesLimits where the workflow applies. Use
trustpoint: truefor a global workflow, or restrict it by CA, domain, or device ID.applyOptional preconditions. Every condition in the list must match.
workflow.startThe first step to execute.
workflow.stepsandworkflow.flowThe named steps and their transitions.
At runtime, expressions can read:
eventThe immutable event payload.
varsMutable workflow state written by previous steps.
Expressions use ${...}, for example ${event.device.common_name} or
${vars.http_status}.
Small Example¶
This workflow asks an operator to approve an EST simpleenroll request:
schema: trustpoint.workflow.v2
name: Approve EST simpleenroll
enabled: true
trigger:
on: est.simpleenroll
sources:
trustpoint: true
ca_ids: []
domain_ids: []
device_ids: []
apply:
- exists: ${event.device}
workflow:
start: approval_gate
steps:
approval_gate:
type: approval
title: Approve certificate request
timeout_seconds: 3600
flow: []
When the approval is accepted, the workflow ends as approved. When it is
rejected, it ends as rejected. When it expires, it ends as timed_out.
No special end step is needed.
Step Types¶
Use these step types to build workflows:
approvalWait for an operator decision. Approved and rejected outcomes may either end directly or route to another step. Timeout may route to follow-up handling, but that route must end with an explicit non-continuing result.
logicEvaluate ordered conditions and route by outcome.
setWrite literal or templated values into
vars.computeWrite
varsusing safe expressions such asadd,round,concat,lower, orupper.webhookCall an HTTP endpoint and optionally capture response data into
vars.emailSend an email through the configured Django email backend.
notificationCreate a Trustpoint notification.
set_statusExplicitly set the workflow result to
finished,approved,rejected,timed_out,stopped, orpaused.
error is not a workflow-authored result. It is reserved for retryable
runtime failures.
Flow and Endings¶
Workflow branches end naturally when a step has no next step. Legacy terminal
tokens such as $end and $reject are not used.
Use a normal linear transition for simple flow:
- from: call_api
to: notify
Use an outcome transition when a step produces outcomes:
- from: route_status
on: ok
to: mark_approved
Important rules:
Every step must be reachable from
workflow.start.logicoutcomes must be routed.approvalapproved and rejected outcomes may be routed, but do not have to be.approvaltimeout outcomes may be routed, but every timeout branch must end withset_statusasrejected,timed_out,stopped, orpaused.A
set_statusterminal result cannot have outgoing flow.set_status: pausedmust have one linear outgoing flow entry. That target becomes the resume point.
Lifecycle States¶
Runs and instances use a small status vocabulary:
queued/runningWork is waiting or executing.
awaitingAn approval is waiting for an operator.
pausedThe workflow intentionally paused and can resume from its stored next step.
errorA retryable runtime error occurred. Operators can resume or stop it.
finishedThe branch ended without an explicit business approval or rejection.
approved/rejectedThe workflow ended with a business decision.
timed_out/stopped/cancelledThe workflow cannot continue.
For enrollment requests, Trustpoint translates these states into request decisions:
approvedandfinishedContinue the request.
queued,running,awaiting,paused, anderrorWait.
rejectedReject the request.
timed_out,stopped, andcancelledFail the request.
Request Locks¶
Some enrollment requests use a request lock to avoid duplicate workflow runs for the same request details. While a run holds the lock, the same request maps back to that run.
On a terminal run, operators can use Allow same request again to release the lock. This does not change the old result. It only allows identical request details to create a fresh workflow run later.
The Runs page shows whether a run is locked, released, or released manually.
Operator Views¶
DefinitionsCreate, edit, enable, and disable workflows. The saved name comes from the YAML
namefield.RunsInspect triggered runs, status, event context, source context, instances, and request locks. The list supports broad search and filters for status, trigger, and request-lock state.
WaitingReview pending approvals, paused workflows, and retryable runtime errors. Paused and errored instances can be resumed from their current step or stopped.