Portal Community

What Is the Execution Context?

When a FlowStudio workflow runs, it maintains an execution context — a key-value store that accumulates data as nodes execute. Each node can read from and write to this context. When the workflow reaches an Atlas Forms interaction node, the form is presented with access to this context.

// Example execution context at the point an Atlas Forms node runs
{
  "currentUser": {
    "id":          "usr-1234",
    "email":       "jane.smith@acme.com",
    "displayName": "Jane Smith",
    "roles":       ["admin", "reviewer"]
  },
  "tenant": {
    "id":          9,
    "displayName": "Acme Corp",
    "currency":    "AUD"
  },
  "workflow": {
    "executionId": "exec-5678",
    "startedAt":   "2026-05-25T09:30:00Z"
  },
  "previousNodeOutput": {
    "riskScore":   72,
    "flaggedItems": ["credit-check", "address-verification"]
  }
}

Reading From $context

// Display the current user's name as a read-only label
{
  "id":   "reviewer-name",
  "type": "label",
  "label": "Reviewer",
  "binding": {
    "source":   "$context",
    "path":     "currentUser.displayName",
    "readOnly": true
  }
}

// Pre-fill the currency field from tenant configuration
{
  "id":    "currency",
  "type":  "select",
  "label": "Currency",
  "binding": {
    "source": "$context",
    "path":   "tenant.currency"
    // readOnly omitted — user can change if needed
  }
}

// Show the risk score from a previous node's output
{
  "id":   "risk-score-display",
  "type": "number",
  "label": "Risk Score",
  "binding": {
    "source":   "$context",
    "path":     "previousNodeOutput.riskScore",
    "readOnly": true
  }
}

Writing to $context

When a $context binding is not readOnly, user changes are written back to the context store at that path. This allows the form to pass new data to subsequent workflow nodes:

// User approves or rejects — decision written back to context
{
  "id":    "approval-decision",
  "type":  "select",
  "label": "Decision",
  "options": [
    { "value": "approved",  "label": "Approve" },
    { "value": "rejected",  "label": "Reject" },
    { "value": "escalated", "label": "Escalate" }
  ],
  "binding": {
    "source": "$context",
    "path":   "approvalDecision"
    // readOnly omitted — user writes the decision
  }
}

// After the form submits, the next workflow node reads:
// context.approvalDecision === 'approved' | 'rejected' | 'escalated'

$json vs $context

Aspect$json$context
Source dataEntity passed as initialValuesWorkflow execution memory store
Primary useEditing entity fieldsReading workflow variables, writing decisions
Two-way by defaultYesYes (unless readOnly)
Available outside workflowsYes — just pass initialValuesNo — requires a FlowStudio execution context
Typical readOnly usageDisplaying a computed fieldDisplaying user identity, tenant info, previous node output
$context Is Null Outside Workflows If a form is rendered outside a FlowStudio workflow (e.g., directly embedded in an app), the execution context is empty. Controls with source: "$context" will read undefined and the initial value will be empty. Always verify that context values are available before shipping a context-bound form.