Projects Trace API Documentation
Projects Trace API Documentation
Status: BETA — the endpoints form the Projects: Trace (BETA) group of the OpenAPI spec (/rest/openapi.json)
Base Path: /rest/projects/{projectId}/trace
{projectId} is the project id and tableId the table id the API hands out. The workflows and examples use
6Q2M8XK4ZT0RB for the project, 4D7RX2KQ9MTB8C1E for the decision table DT_RiskAssessment and
9B3VZH6N2WQ5KF0A for its test table TEST_RiskAssessment.
[!Note] This is the interactive debugger API. See Architecture Design for how suspension and the live stack work.
Table of Contents
- Overview
- Session Lifecycle
- API Reference
- Breakpoint Keys
- Data Models
- WebSocket Notifications
- Workflows
- Error Handling
- Examples
Overview
The Projects Trace API drives an interactive debugger for OpenL rules: start a session on a table, then step into/over/out, set breakpoints, run to a breakpoint, inspect the live call stack, and freeze a frame’s variables — all against a real, suspended execution rather than a pre-built tree.
Key features
- Real suspended execution — the rule runs on a dedicated worker thread that parks at breakpoints and step points; its JVM stack holds all live state. Resuming continues forward, never re-runs.
- Live stack, not a full tree — only the frames from the root call to the current point are retained, so memory is bounded by stack depth.
- Stepping — Step Into, Step Over, Step Out, Resume, and asynchronous Pause. A step that finishes a
frame first suspends at that frame’s own exit (its result is on the stack), then continues in the
caller. An exception suspends at the throwing frame before it propagates, and every live caller on the
stack is stamped with the same throwable for variables and step-inputs so ancestor inspection still
returns the messages (the stack frame’s
errorflag stays on the completed throwing frame only). - Breakpoints — on a table by URI or by name (stops on every same-named version), on a spreadsheet cell, on any fired decision-table rule, or on a specific rule. See Breakpoint Keys.
- Profiling (executed call tree) — with
profiling=truethe session retains the structure of returned calls: which steps ran, what each step called, execution times (total and self), dispatcher choices, and references to re-used steps. Structure only — no values are retained. The response also carries a boundedprofileoverview (the slowest tables); passincludeTree=falseto get only that when the whole tree would be too large. - Business-view tree — with
fullTree=truethe response lists the upper levels of the executed tree at once, and the server keeps the whole tree after the run, so the deep branches load on expand without running the calculation again (GET /tree/node). The tree outlives the sessions that re-run the calculation to inspect a row, and every run keeps a tree of its own, so trace windows open side by side each browse their own. - Lazy variable freezing — a frame’s parameters/context/result are deep-cloned only when inspected, while suspended, and discarded when the frame returns. Large values load on demand.
- One session per client — a browser session, or the credentials of a stateless client; starting a new session terminates the previous one. Idle suspended sessions are reaped automatically after 10 minutes.
Use cases
- Rule debugging — walk a calculation step by step to see why it produced a result.
- Decision table analysis — see which conditions matched, which rule fired, and break when a rule fires.
- Spreadsheet inspection — follow cell evaluation order and inspect already-computed cell values.
- Performance profiling — find the slow table or step from the executed call tree’s timings.
- Test case debugging — debug a specific test case from a test suite.
Components
The controller, the services, and the debug engine are described in Architecture layers.
Session Lifecycle
A session moves through these statuses (also returned in every stack/status response):
| Status | Meaning | Accepts commands |
|---|---|---|
pending |
Created; worker not started yet | — |
running |
Executing, not suspended | pause |
suspended |
Paused at a breakpoint or step point; stack is inspectable | step, resume, inspect |
completed |
Finished normally | terminal |
error |
Failed with an error | terminal |
terminated |
Cancelled before finishing | terminal |
The normal flow is pending → running ⇄ suspended → completed; error and terminated are the other
terminal states. Status transitions are pushed over WebSocket (see below). After completed the stack is
empty, but a profiling session still exposes the executed tree in DebugStackView.tree (or, with
fullTree=true, in DebugStackView.treeNodes) and a bounded overview of it in DebugStackView.profile.
API Reference
1. Start a debug session
Endpoint: POST /rest/projects/{projectId}/trace
Starts a session and runs to the first suspension (or to completion when nothing suspends). Any previous
session for this user is terminated and the parameter registry is cleared. Active breakpoints (set earlier
via PUT /breakpoints) apply immediately.
Path parameters:
projectId(string, required) — the project id the API hands out.
Query parameters:
tableId(string, required) — table to debug.testRanges(string, optional) — test-case selection for a test table (e.g.1-3,5).fromModule(string, optional) — module name to run against the currently opened module.stopAtEntry(boolean, defaulttrue) — suspend at the entry of the first frame; whenfalse, run to the first breakpoint.profiling(boolean, defaultfalse) — retain the executed call tree (structure and timings, no values). Uses more memory and runs slower.includeTree(boolean, defaulttrue) — embed the executed tree in the response (tree, ortreeNodeswithfullTree). Set tofalseto keep only the boundedprofileoverview when the whole tree would be too large.profileTop(integer, default20, min1) — how many hotspots (slowest tables) theprofileoverview returns.view(full|compact, defaultfull) — per-frame detail.compactkeeps sub-steps only on the active frame, so stepping does not re-send every frame’ssteps; read another frame’s steps withGET /stack?view=fullor its variables endpoint.breakOnErrors(boolean, defaulttrue) — suspend on the frame that throws an uncaught rule error so it can be inspected. AStackOverflowErrorleaves no stack to suspend on, so the run suspends once the error reaches the root call, and the stack shown is the one where the overflow happened. Withfalsethe error ends the run, and the executed tree with the failed branch is returned whole.detailedTitles(boolean, defaultfalse) — build the detailed titles into the executed tree: each table node reads as its signature and result, and each spreadsheet cell as its value. It carries the values of the run, so it is off by default.fullTree(boolean, defaultfalse) — the business view: return the executed tree as the flattreeNodeslist instead oftree, the root first, then every call after the node that made it. A node names its caller byparentandparentStepand carries no sub-calls of its own, so the response nests no deeper however deep the calls went — a rule that recursed until aStackOverflowErrorincluded. The list is filled level by level up to 50,000 calls: every call of a step is listed, every iteration of a repeated call included, before the calls they made. A step whose calls do not fit is left out whole and reports their count inchildrenTotal. The versions of a dispatched table come once for each distinct choice, intreeDispatches. The server keeps the whole tree after the run, under thesessionIdof the response, soGET /tree/nodeloads the steps left out (see Load the calls below a step of the kept tree). Without ittreeholds the root only, andGET /tree/childrenpages its branches.
Request body (optional, application/json): raw input for a regular method. Supports a structured form
whose params is either a named object or a positional array ({ "runtimeContext": {...}, "params": [...] }),
a raw named-parameter object, or a raw positional array. Positional values are matched in method signature order.
For a method whose only parameter is an array, a raw array remains that parameter’s value; use the structured form
to express positional input unambiguously. A positional array cannot contain more values than the method declares;
missing trailing values remain unset. The body is parsed by TableInputParserService.
[!Note] The session remembers the last input. A restart that sends neither a body nor
testRanges(for example togglingprofiling, or a replay) re-runs the trace with the remembered input.
Response: 200 OK — a DebugStackView at the first suspension (or terminal state).
Errors:
404 Not Found(table.message) — the table or its method is not found.409 Conflict(trace.table.compile.errors.message) — the table has compilation errors, or, for a test table, a table it tests has. The errors are read from the whole project, or from the module named byfromModule. The message carries the first line of the first error.
2. Get session status
Endpoint: GET /rest/projects/{projectId}/trace/status
Lightweight poll. Response: 200 OK — DebugStatusView.
Errors: 404 Not Found (trace.execution.task.message) when there is no session.
3. Get the execution stack
Endpoint: GET /rest/projects/{projectId}/trace/stack
Query parameters: view (full | compact), includeTree (boolean), profileTop (integer) —
same response-shaping params as start (see Start a debug session).
Response: 200 OK — DebugStackView, frames ordered root → current. Readable
while suspended or in a terminal state.
Errors: 404 Not Found when there is no session; 409 Conflict
(trace.execution.not.suspended.message) while the worker is still running (the worker mutates its
frames as it executes, so the stack is readable only once it has parked or finished).
4. Step
Endpoint: POST /rest/projects/{projectId}/trace/step
Steps once and returns the new stack once the worker re-suspends (bounded wait, 30 s).
Query parameters:
type(string, required) — one ofinto,over,out.view(full|compact),includeTree(boolean),profileTop(integer) — same response-shaping params as start.view=compactis the useful one here: it drops the non-active frames’stepsso a step returns only the frame that changed.
A step that finishes the current frame suspends at that frame’s own exit first — the completed frame stays on the stack with its result — and the next step continues in the caller.
Response: 200 OK — DebugStackView.
Errors:
400 Bad Request—typeis not one of the enum values (malformed parameter).404 Not Found— no session.409 Conflict(trace.execution.not.suspended.message) — the session is not suspended.
5. Resume
Endpoint: POST /rest/projects/{projectId}/trace/resume
Runs to the next breakpoint or to completion. Response: 202 Accepted (no body); the outcome arrives
via WebSocket. Read /stack on the next suspended/terminal status.
Errors: 404 Not Found (no session); 409 Conflict (not suspended).
6. Pause
Endpoint: POST /rest/projects/{projectId}/trace/pause
Requests suspension at the next safepoint. Response: 202 Accepted (no body).
Errors: 404 Not Found (no session).
7. Get frame variables
Endpoint: GET /rest/projects/{projectId}/trace/frames/{index}/variables
Freezes (deep-clones) the frame at index while suspended and returns its parameters, context, result,
sub-steps with computed values, spreadsheet grid names, the decision-table outcome, and errors.
Query parameters: includeSchema (boolean, default false) — generate a JSON schema for the type of each value.
It is expensive for a large result, so it is off by default.
Response: 200 OK — DebugFrameVariables.
Errors: 404 Not Found (no session, or trace.frame.not.found.message); 409 Conflict (not
suspended).
8. Get frame highlights
Endpoint: GET /rest/projects/{projectId}/trace/frames/{index}/highlights
Returns the execution highlight overlay for the frame’s table, keyed by A1 cell address. The client renders the table itself (through the shared Tables API raw view) and paints the overlay on top: the current cell, a decision table’s evaluated conditions (matched / not matched), and the fired rule’s result.
Response: 200 OK — array of CellHighlight. Empty at a frame’s entry, before any
line executes.
Errors: 404 Not Found (no session, or frame not found); 409 Conflict (not suspended).
9. List breakpoints
Endpoint: GET /rest/projects/{projectId}/trace/breakpoints
Returns the active breakpoint keys. Works without a running session (breakpoints are kept for the client and persist across runs).
Response: 200 OK — array of strings (see Breakpoint Keys).
10. Replace breakpoints
Endpoint: PUT /rest/projects/{projectId}/trace/breakpoints
Replaces the whole breakpoint set. Effective on the next frame enter / current-line change. Works without a running session, so breakpoints can be set before starting.
Request body (BreakpointsRequest):
{ "uris": ["RiskAssessment", "file:/.../Rules.xlsx?...#R0C1", "file:/.../DT.xlsx?...#rule"] }
Response: 204 No Content.
11. List breakpoint targets
Endpoint: GET /rest/projects/{projectId}/trace/breakpoint-tables
Returns the rule tables a breakpoint can be set on, deduplicated by name (a name key stops on every overloaded or dimensional version). With an active session, only tables reachable from the traced table through the dependency graph are offered; without a session (or when the traced table is outside the graph, e.g. a test table) every executable table is returned. Sorted by name.
Query parameters:
fields(string, optional) — standard response projection, e.g.fields=namereturns names only.
Response: 200 OK — array of BreakpointTableView.
12. Get a lazy parameter value
Endpoint: GET /rest/projects/{projectId}/trace/parameters/{parameterId}
Fetches the full value of a parameter that was returned lazily (lazy: true) in frame variables.
Query parameters: includeSchema (boolean, default false) — as for the frame variables.
Response: 200 OK — ParameterValue with the value inlined.
Errors: 404 Not Found (no session, or trace.parameter.not.found.message).
13. Watch cells across the run
Watch a factor across the whole run: retain the value of named cells on every execution of their table, so a factor can be read across all coverages or iterations without dumping every frame. Watches retain values only for the named cells — the one opt-in exception to the values-only-while-suspended rule.
Set the watch set — PUT /rest/projects/{projectId}/trace/watches, body
WatchesRequest. The set persists across runs and applies on the next start, since
a watch captures from the beginning of a run. 204 No Content.
Get the watch set — GET /rest/projects/{projectId}/trace/watches → string[].
Get the collected values — GET /rest/projects/{projectId}/trace/watch → WatchView. Complete
once the run has finished; carries the executions seen so far while it is still suspended. 409 Conflict
while the worker is still running.
Typical flow: PUT /watches → POST / with stopAtEntry=false (run through, includeTree=false to keep
the response small) → GET /watch.
14. Terminate the session
Endpoint: DELETE /rest/projects/{projectId}/trace
Terminates the worker and clears the session and parameter registry. Idempotent. The trees kept from the business-view
runs (fullTree=true) stay, so the calls below their steps still load: another trace window may be browsing one, and
each window releases its own with DELETE /tree.
Response: 204 No Content.
15. Get the inputs of a spreadsheet step
Endpoint: GET /rest/projects/{projectId}/trace/frames/{index}/step-inputs
Returns one spreadsheet step on its own: the values its formula consumed, the value the step returned, and the address of its cell.
Query parameters:
ref(string, required) — the reference of the step in the frame.includeSchema(boolean, defaultfalse) — as for the frame variables.
Response: 200 OK — StepInputsView:
inputs— the values the formula read, named as the formula writes them: sibling steps such as$LimitIndex, the parameters of the table, the fields of a parameter opened into the scope of the table, and the constants of the module. A step that has not run yet is left out. Empty for a frame that is not a spreadsheet and for an unknown step.result— the value of the step, namedreturn. Absent for a formula cell that has not run.cell— the A1 address of the step’s cell in the raw table.errors— the errors the step raised. Present only on the step where the run failed.
Errors: 404 Not Found (no session, or frame not found); 409 Conflict (not suspended).
16. Page the executed sub-calls of a step
Endpoint: GET /rest/projects/{projectId}/trace/tree/children
With profiling=true the executed tree is shallow, and this endpoint loads the sub-calls of one step on demand, so the
tree of a large run is never sent whole.
Query parameters:
uri(string, required) — the source URI of the frame.instance(integer, required) — the zero-based execution index of the frame in the run, so a given loop iteration is reachable.step(string, required) — the reference of the step whose sub-calls to return.offset(integer, default0) — the index of the first sub-call.limit(integer, default100, min1) — how many sub-calls to return.
Response: 200 OK — { "children": [...], "total": n }. Each child is a shallow CallNodeView:
its own steps but not its sub-calls. total is the number of sub-calls of the step, so a client pages through the rest.
17. Load the calls below a step of the kept tree
Endpoint: GET /rest/projects/{projectId}/trace/tree/node
Returns the calls one step of a node made, and the levels below them, from the tree kept from a business-view run
(fullTree=true), as one flat list, so a deep part of the tree loads when it is expanded. The calculation is not run
again: the calls are read from the tree the run recorded, which outlives its session. The clicks that re-run the
calculation to inspect a row cancel their session and start sessions that record no tree, so the kept tree stays.
Every run keeps a tree of its own. A tree is released:
- by
DELETE /tree— the business view sends it for its previous run when it runs again, and as its window closes; - once the client sent no trace request for ten minutes;
- when the client changes a workbook, or its workspace is reset;
- when the client ends — its browser session, or the idle credentials of a stateless client.
A tree keeps every call of its run, however many the run made, and is never released to make room for another one. Profiling: the executed call tree gives the heap it takes.
Query parameters:
run(string, required) — thesessionIdof the business-view run. The calls of another run are not found.uri(string, required) — the source URI of the node.instance(integer, required) — the zero-based execution index of the node in the run.step(string, required) — the reference of the step whose calls to return.offset(integer, default0, min0) — the number of calls of the step already loaded.
Response: 200 OK — CallTreeView: the calls of the step from offset on, then the levels below
them, up to 10,000 calls. A step that made more calls is loaded in pages: ask again with the number of its calls held.
A node or step not in the tree gives an empty list.
Errors: 404 Not Found — trace.tree.released.message, the tree of that run is released.
18. Release the kept tree of a run
Endpoint: DELETE /rest/projects/{projectId}/trace/tree
Releases the tree kept from one business-view run. The trees of the other runs of the client stay, so a trace window releases its own tree without touching the trees other windows browse. Idempotent.
Query parameters:
run(string, required) — thesessionIdof the business-view run.
Response: 204 No Content.
19. Export the trace
Endpoint: GET /rest/projects/{projectId}/trace/export
Replays the run of the active session with a recording tracer, and answers the whole executed tree as plain text: one
indented TRACE: line for each table frame, spreadsheet cell, and decision table check, with its computed value. The
tree is capped at a number of nodes, so a huge run gives a truncated trace instead of exhausting the memory.
Query parameters:
release(boolean, defaultfalse) — drop the session once the trace is written.smartNumbers(boolean, defaulttrue) — the readable number format. Withfalsethe numbers keep their full precision.
Response: 200 OK — text/plain, sent as the attachment trace.txt.
Breakpoint Keys
All breakpoints ride one set of string keys (PUT /breakpoints). A key is matched at a frame enter
or at a current-line change:
| Key form | Matches | Example |
|---|---|---|
<uri> |
Entry of the table with this source URI | file:/.../Rules.xlsx?sheet=Main&range=B2:D8 |
<name> |
Entry of any table with this name (every overloaded or dimensional version) | VehiclePremiumCalculation |
<table>#R{r}C{c} |
A spreadsheet cell of that table becoming the current line | file:/...#R0C1 |
<table>#rule |
Any rule of that decision table firing (all conditions matched) | VehicleRating#rule |
<table>#{ruleName} |
A specific rule of that decision table firing | VehicleRating#SeniorDriver |
<key>@N |
Any of the above, but only on the table’s N-th execution (0-based) | VehiclePremiumCalculation@3 |
after:<key> |
Any of the above, but right after the target ran instead of before it | after:file:/...#R48C0@3 |
Rule-fired breakpoints suspend before the rule’s action runs, with the evaluated conditions already captured — the decision panel shows which rule fired and which conditions matched.
The @N suffix targets one iteration of a table that runs many times (for example one coverage of a
per-coverage spreadsheet). N is the same zero-based number as DebugFrameView.instance and a watch
series’ instance — so an outlier found on instance: 3 in a watch is reached with <uri>#<ref>@3.
Executions are counted per table version, so <name>@N counts the runs of each same-named version
separately. Without a suffix a cell breakpoint fires on every execution, from the first.
An after: key does not suspend where its target would. It lets the target run and suspends right after:
a table at its own exit, with its result on the stack, and a sub-step on the next line once it has
computed its value. One resume then lands with the target’s parameters and result both readable.
<table> is either form of the owning table — its URI or its name. A sub-step key therefore works before
the table has ever run, which matters because GET /breakpoint-tables
offers targets by name: a URI only becomes known once the table appears in a live stack.
Data Models
DebugStackView
interface DebugStackView {
status: DebugStatus; // pending | running | suspended | completed | error | terminated
frames: DebugFrameView[]; // root (index 0) → current; empty after completion
error?: DebugError; // present only when status = error
tree?: CallNodeView; // root of the executed tree after completion (profiling; omitted if includeTree=false
// or fullTree=true)
treeNodes?: CallNodeView[]; // the executed tree as one list, root first, upper levels whole (fullTree=true only)
treeDispatches?: DispatchInfo[]; // the distinct dispatches of treeNodes, named by CallNodeView.dispatchIndex
profile?: ProfileSummaryView; // bounded hotspots overview after completion (profiling only)
sessionId?: string; // id of the session; the WebSocket status events carry the same id
}
ProfileSummaryView
A bounded overview of a finished profiled run — the slowest tables, aggregated across the whole run. It is
constant-sized regardless of run size (unlike tree, which grows with every invocation), so it is the
safe way to understand a large run. Fetch the full tree only to drill into a specific branch.
interface ProfileSummaryView {
hotspots: ProfileHotspotView[]; // slowest tables by own time, most expensive first, capped to profileTop
distinctTables: number; // distinct tables that ran (may exceed hotspots.length)
nodeCount: number; // total table invocations in the run (the size of the full tree)
totalMillis: number; // wall-clock time of the whole run, excluding parked time
}
interface ProfileHotspotView {
uri: string;
name: string;
kind: FrameKind;
selfMillis: number; // own time across all invocations (excludes called tables); sums to wall-clock
totalMillis: number; // inclusive time across all invocations (own work + called tables)
count: number; // number of invocations folded into this hotspot
}
DebugFrameView
interface DebugFrameView {
index: number; // position in the stack, 0 = root
depth: number; // frame depth, 1 = root
instance: number; // 0-based execution number of this table (for uri#ref@N breakpoints / watch)
uri: string; // table source URI (breakpoint + raw-table key)
tableId: string; // table id for the shared Tables API (?raw=true)
name: string; // table display name (breakpoint-by-name key)
kind: FrameKind; // decisionTable | spreadsheet | method | cmatch | tbasic | tbasicMethod
location?: DebugLocationView; // current line, or absent at frame entry
active: boolean; // true for the top (current) frame
completed: boolean; // frame has returned (its result is inspectable)
error: boolean; // frame failed
steps?: StepValueView[]; // sub-steps with status (executed sub-calls in profiling); absent on non-active frames when view=compact
durationMillis?: number; // total execution time of a returned frame, excluding parked time
selfMillis?: number; // own time of a returned frame (total minus called tables)
dispatch?: DispatchInfo; // set when this table was chosen from overloaded versions
}
DebugLocationView
interface DebugLocationView {
kind: LocationKind; // cell | dtrule | operation
row?: number; // cell row index
column?: number; // cell column index
ref?: string; // short cell reference, e.g. "R2C3" (breakpoint sub-step key)
label?: string; // human-readable, e.g. "$Formula$HouseTotal" or a fired rule name
}
DebugFrameVariables
interface DebugFrameVariables {
parameters: ParameterValue[]; // input parameters
context?: ParameterValue; // runtime context, if any
result?: ParameterValue; // return value, if the frame has completed
steps: StepValueView[]; // sub-steps with computed values (spreadsheets: every cell with status)
gridColumns?: string[]; // spreadsheet column names, for a grid layout (spreadsheet frames only)
gridRows?: string[]; // spreadsheet row names (spreadsheet frames only)
decision?: DecisionView; // which rule fired and which conditions matched (decision tables only)
ruleNames?: string[]; // every rule of the decision table, in rule order (decision tables only)
errors: MessageDescription[]; // errors if the frame failed, or the same messages when it is a live
// caller stamped for inspect (break-on-exception); stack `error`
// remains true only on the completed throwing frame
}
StepValueView
interface StepValueView {
ref: string; // sub-step reference, e.g. "R2C3" (breakpoint key suffix uri#ref)
label?: string; // human-readable step name, e.g. "$Formula$HouseTotal"
cell?: string; // A1 address of the step's cell in the raw table (spreadsheet cells only)
constant?: boolean; // true for a value or constant cell, which never executes (executed tree only)
decision?: DecisionRow; // matched | unmatched | returned, for a decision-table row of the executed tree
status: StepStatus; // executed | current | pending
value?: ParameterValue; // frozen computed value for an executed step (variables endpoint only)
children?: CallNodeView[]; // what this step called or referenced, in execution order (profiling)
childrenTotal?: number; // number of tables the step called, when the children list is capped
durationMillis?: number; // total time of an executed step: its own work plus the tables it called
selfMillis?: number; // own time of an executed step (total minus called tables)
}
In a live frame only executable cells are steps: a spreadsheet cell with a formula that is actually evaluated.
Value cells, constants, and section-title dividers never execute. The executed tree lists the value and constant
cells of a spreadsheet as well, with constant: true and no time, so it shows the whole table.
CallNodeView
interface CallNodeView {
uri: string; // source URI of the table
name: string; // display name; for a stepRef node, the referenced step's label
instance: number; // 0-based execution number of this table in the run (for uri@N breakpoints)
kind: FrameKind; // table kind, or "stepRef" for a step reference
durationMillis: number; // total execution time (this table and everything it called)
selfMillis: number; // own time (total minus the tables it called)
steps: StepValueView[]; // the executed sub-steps, each possibly with its own sub-calls
dispatch?: DispatchInfo; // set when the table was chosen from overloaded versions (never in a flat list)
dispatchIndex?: number; // in a flat list, the position of that dispatch among the list's dispatches
refStep?: string; // for a stepRef node, the ref of the original step it points at
parent?: number; // in a flat list, the position of the node whose step made this call
parentStep?: string; // in a flat list, the ref of that step
}
A node of the executed call tree (profiling): a returned table invocation, kept as structure only — no
values. A stepRef node is not a table: a formula computed or re-read another step of the same
frame; the reference points at the original step (refStep) and carries no time or children of its own,
so a shared step is never duplicated in the tree.
In a flat list — treeNodes, or the CallTreeView of a step’s calls — a node’s steps carry no
children: each call is listed after its caller and points back at it with parent and parentStep. A client puts
the tree together by attaching every node to that step of its parent, in list order, which is the order the calls
ran. A step whose calls the list left out reports their count in childrenTotal. A node names its dispatch by
dispatchIndex in the dispatches sent beside the list, so the versions of a table called thousands of times are sent
once for each distinct choice.
CallTreeView
interface CallTreeView {
nodes: CallNodeView[]; // the calls of the step, then the levels below them
dispatches?: DispatchInfo[]; // the distinct dispatches of the nodes, named by dispatchIndex
}
The calls below a step of the kept business-view tree (GET /tree/node). A call of the requested step names no
parent: the client attaches it to that step, after the calls already loaded.
DispatchInfo
interface DispatchInfo {
candidates: { label: string; chosen: boolean }[]; // the overloaded versions; the chosen one flagged
}
Present on a frame or call node that was selected by a dispatcher — a table overloaded by dimension properties (e.g. effective dates). The dispatcher itself is transparent: the chosen version appears in place, badged with the candidates.
CellHighlight
interface CellHighlight {
cell: string; // A1 address in the table's sheet, e.g. "C5"
state: HighlightState; // current | result | conditionTrue | conditionFalse
}
DecisionView
interface DecisionView {
firedRules: string[]; // the rule(s) that fired
conditions: {
condition: string; // condition name, e.g. "C1"
rule: string; // rule name
matched: boolean; // condition matched for that rule
}[];
}
DebugError
interface DebugError {
summary: string; // cleaned, user-readable message
table?: string; // the failing table's name
location?: string; // the failing step, e.g. "$Formula$Total"
type?: string; // exception type, e.g. "IllegalStateException"
detail?: string; // technical stack trace, capped
}
DebugStatusView
interface DebugStatusView {
status: DebugStatus;
}
BreakpointsRequest
interface BreakpointsRequest {
uris?: string[]; // breakpoint keys (see Breakpoint Keys); null/omitted clears all
}
WatchesRequest
interface WatchesRequest {
cells?: string[]; // cell names ($... step label) or refs (R2C3) to watch; null/omitted clears all
}
WatchView
The collected values of the watched cells — a factor read across the whole run. One series per cell; the UI can pivot series that share a table into a matrix (rows = executions, columns = cells), while an agent reads a single series as a value sequence to spot the outlier.
interface WatchView {
series: WatchSeriesView[];
truncated: boolean; // the capture cap was reached, so some late executions are missing
}
interface WatchSeriesView {
name: string; // the watched cell name (its $... step label)
table: string; // display name of the owning table
tableUri: string; // owning table URI (replay target)
points: WatchPointView[]; // one per execution of the table, in execution order
total: number; // number of executions of the table; may exceed the number of points
}
interface WatchPointView {
instance: number; // 0-based execution number of the owning table (its 1st, 2nd, … invocation)
label: string; // human axis label, e.g. "CoveragePremium #3"
path: string[]; // call path root → owning frame, as table names
ref: string; // breakpoint key uri#cellRef to reach this cell (replay + breakpoint)
value: ParameterValue; // serialized like any traced value (dates, arrays, results); lazy when large
}
BreakpointTableView
interface BreakpointTableView {
name: string; // table name — the breakpoint key (stops on every same-named version)
kind: FrameKind; // table kind, for an icon
}
ParameterValue
interface ParameterValue {
name: string;
description: string; // type description
lazy?: boolean; // true → value omitted, fetch via /parameters/{parameterId}
parameterId?: number; // id for lazy fetch
type?: string; // declared type of a lazy value, e.g. "Driver[]"; absent when the value is present
key?: string; // data-table key of a lazy value, e.g. "Sara"; absent when the value is present
value?: any; // JSON value (absent when lazy)
schema?: object; // JSON Schema for the type
}
MessageDescription
interface MessageDescription {
id: number;
summary: string;
severity: "INFO" | "WARN" | "ERROR";
}
WebSocket Notifications
Status transitions are pushed to the per-user destination:
/user/topic/projects/{projectId}/tables/{tableId}/trace/status
The payload carries the status code and the id of the session, for example
{"status": "suspended", "sessionId": "..."}. Sessions of the same user and table share the topic, so a client drops
the events whose sessionId is not the one of the DebugStackView it watches. On suspended the client
reads the new stack from GET /stack; on completed/error/terminated it shows the terminal state
(on error, GET /stack still returns the structured error). Synchronous endpoints (POST / and
POST /step) also return the stack directly, so the WebSocket is mainly needed for the asynchronous
resume/pause outcomes.
sequenceDiagram
participant UI as React UI
participant API as REST API
participant WS as WebSocket
UI->>API: POST /trace?tableId=... (stopAtEntry=true)
API-->>UI: 200 DebugStackView (suspended at entry)
UI->>API: POST /trace/step?type=into
API-->>UI: 200 DebugStackView (next line)
UI->>API: GET /trace/frames/0/variables
API-->>UI: 200 DebugFrameVariables
UI->>API: POST /trace/resume
API-->>UI: 202 Accepted
WS-->>UI: status completed, sessionId
UI->>API: GET /trace/stack
API-->>UI: 200 DebugStackView (completed, + tree when profiling)
Workflows
Workflow 1: Step through a rule
1. (optional) Set breakpoints up front
PUT /rest/projects/6Q2M8XK4ZT0RB/trace/breakpoints { "uris": ["<tableUri>#R0C1"] }
2. Start, suspended at entry
POST /rest/projects/6Q2M8XK4ZT0RB/trace?tableId=4D7RX2KQ9MTB8C1E
→ 200 DebugStackView { status: suspended, frames: [ { index:0, name:"DT_RiskAssessment", ... } ] }
3. Step into the calculation
POST /rest/projects/6Q2M8XK4ZT0RB/trace/step?type=into
→ 200 DebugStackView (current line advanced)
4. Inspect the current frame
GET /rest/projects/6Q2M8XK4ZT0RB/trace/frames/0/variables
GET /rest/projects/6Q2M8XK4ZT0RB/trace/frames/0/highlights (overlay for the client-rendered table)
GET /rest/projects/6Q2M8XK4ZT0RB/tables/{tableId}?raw=true (the table content itself)
5. Run to the next breakpoint / completion
POST /rest/projects/6Q2M8XK4ZT0RB/trace/resume → 202
(WebSocket: suspended or completed) → GET /rest/projects/6Q2M8XK4ZT0RB/trace/stack
6. Finish
DELETE /rest/projects/6Q2M8XK4ZT0RB/trace → 204
Workflow 2: Break when a decision-table rule fires
1. PUT /rest/projects/6Q2M8XK4ZT0RB/trace/breakpoints { "uris": ["<dtUri>#rule"] }
(or "<dtUri>#SeniorDriver" for one specific rule)
2. POST /rest/projects/6Q2M8XK4ZT0RB/trace?tableId=...&stopAtEntry=false
→ suspends the moment a rule's conditions all match, before its action runs
3. GET /rest/projects/6Q2M8XK4ZT0RB/trace/frames/{i}/variables → decision: { firedRules:["SeniorDriver"], conditions:[...] }
Workflow 3: Profile a calculation (executed call tree)
1. POST /rest/projects/6Q2M8XK4ZT0RB/trace?tableId=...&stopAtEntry=false&profiling=true&includeTree=false
→ runs to completion; the response carries profile: ProfileSummaryView (bounded hotspots),
not the full tree — safe on a large run
2. Read profile.hotspots[]: the slowest tables by selfMillis, with count and totalMillis.
(Omit includeTree=false, or GET /rest/projects/6Q2M8XK4ZT0RB/trace/stack, to also get the full tree: CallNodeView.)
3. To inspect a slow branch live: restart with a breakpoint on that table and step from there
(the UI's "replay" does exactly this — the remembered input is reused automatically).
Workflow 4: Debug a single test case
1. POST /rest/projects/6Q2M8XK4ZT0RB/trace?tableId=9B3VZH6N2WQ5KF0A&testRanges=2
→ 200 DebugStackView (suspended at the entry of test case 2)
2. Step / inspect as above. Cases run sequentially; the worker stops at each case entry.
Workflow 5: Watch a factor across coverages
1. PUT /rest/projects/6Q2M8XK4ZT0RB/trace/watches { "cells": ["$VehiclePriceFactor"] }
2. POST /rest/projects/6Q2M8XK4ZT0RB/trace?tableId=...&stopAtEntry=false&includeTree=false
→ runs to completion, capturing the cell on every execution of its table
3. GET /rest/projects/6Q2M8XK4ZT0RB/trace/watch
→ series[0].points: the factor's value per coverage — the outlier (e.g. 83.372 among 1.0) stands out
4. To inspect an outlier live: replay to its table (points[i].ref / series.tableUri) with a breakpoint.
Workflow 6: Inspect an already-executed spreadsheet step
1. Suspend inside a Spreadsheet frame (step until status=suspended on a cell).
2. GET /rest/projects/6Q2M8XK4ZT0RB/trace/frames/{i}/variables
→ steps: [ { ref:"R0C1", label:"$Value$Base", status:"executed", value:{...}, durationMillis: 1.2 },
{ ref:"R1C1", label:"$Formula$Total", status:"current" }, ... ]
Inspect the computed value of an executed cell while a later cell is current.
Error Handling
An error answers a body of the form {"code": "openl.error.<status>.<key>", "message": "..."}, where <key> is the
message code of the table below; see Errors.
| Scenario | Status | Message code |
|---|---|---|
| Table or method not found (start) | 404 |
table.message |
| Table, or a table it tests, does not compile (start) | 409 |
trace.table.compile.errors.message |
| No active session | 404 |
trace.execution.task.message |
| Frame index out of range | 404 |
trace.frame.not.found.message |
| Lazy parameter id not found | 404 |
trace.parameter.not.found.message |
| Calls below a step of a business-view tree that is released, or of another run | 404 |
trace.tree.released.message |
| Command or inspection requires a suspended session | 409 |
trace.execution.not.suspended.message |
| Stack read while still running | 409 |
trace.execution.not.suspended.message |
Malformed step type (not into/over/out) |
400 |
converter message |
Examples
Start, step, inspect, resume
# Start (suspended at entry), capture the stack
curl -X POST "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace?tableId=4D7RX2KQ9MTB8C1E" \
-H "Content-Type: application/json" \
-d '{ "params": { "age": 35, "income": 75000, "creditScore": 720 },
"runtimeContext": { "lob": "Personal", "usState": "NY" } }'
# Step into
curl -X POST "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace/step?type=into"
# Inspect the top frame's variables
curl "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace/frames/0/variables"
# Highlight overlay for the client-rendered table
curl "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace/frames/0/highlights"
# → [ { "cell": "C5", "state": "current" } ]
# Run to completion
curl -X POST "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace/resume" # 202
# Terminate
curl -X DELETE "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace" # 204
Set a breakpoint before running
# By table name — stops on every overloaded/dimensional version of the table
curl -X PUT "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace/breakpoints" \
-H "Content-Type: application/json" \
-d '{ "uris": ["VehiclePremiumCalculation"] }'
curl -X POST "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace?tableId=4D7RX2KQ9MTB8C1E&stopAtEntry=false"
# Runs to the breakpoint and returns the stack suspended there.
Discover breakpoint targets
# Only tables reachable from the traced table; names deduplicated
curl "http://localhost:8080/rest/projects/6Q2M8XK4ZT0RB/trace/breakpoint-tables?fields=name"
# → [ { "name": "SetContext" }, { "name": "VehiclePremiumCalculation" }, ... ]
Related APIs
- Architecture Design — how suspension, the live stack, and freezing work.
- Tables API — the raw table view (
?raw=true&styles=true) the client renders the traced table from. - Test API — test execution and results.