Flow Studio
Execution-Time Access
Who can trigger workflow execution, how the triggering actor is recorded in ExecutionMemory, and how downstream nodes can access actor information via $user and $context variables.
Who Can Trigger Execution
The following roles can trigger execution (call POST /api/executions):
- Owner — always
- Editor — always
- Executor — always
- Viewer — never (read-only)
Execution Actor Context
When an execution is triggered, the triggering actor is recorded in ExecutionMemory and is available to all node executors via the context:
// In any node executor
var triggeredBy = ctx.ActorId; // userId who called the trigger API
var actorName = ctx.ActorName; // display name (resolved from IAM)
var actorRoles = ctx.ActorRoles; // IAM roles the actor has
$context and $user in Expressions
Nodes can reference actor information in their configuration expressions:
$context.executionId // the current execution ID
$context.actorId // userId who triggered the execution
$context.tenantId // owning tenant
$user.name // actor's display name
$user.email // actor's email
$user.roles // array of IAM role names
HIL Actor vs. Execution Actor
In workflows with Human-in-the-Loop nodes, there are two types of actors:
| Actor Type | Who They Are | Available In |
|---|---|---|
| Trigger Actor | User who started the execution | $context.actorId everywhere |
| HIL Actor | User who responded to a HIL task (approved, submitted form) | In the HIL node's output and the $user variable within the HIL resume context |