GitHub Repository
View source, report issues, and contribute
Installation
Quick start
TheDecisionGraph component requires a JdmConfigProvider wrapper:
Loading WASM for code extensions
The editor uses WebAssembly for syntax highlighting, autocomplete, and expression validation. Load the WASM module at application startup using top-level await:WASM requires these headers on your server for
SharedArrayBuffer support:Features
The decision graph canvas lets you drag and drop nodes onto the canvas, connect nodes to define data flow, pan and zoom to navigate large graphs, and select and delete nodes. The spreadsheet-like decision table editor supports adding input and output columns, defining conditions with unary operators, reordering rows by drag and drop, and hit policy configuration (first, collect). The expression editor provides syntax highlighting for ZEN expressions, autocomplete for functions and fields, inline validation and error messages, and field path suggestions from input schema. The JavaScript function editor includes Monaco editor with syntax highlighting, TypeScript type checking, built-in library support (dayjs, big.js, zod), and async/await support.Configuration
Read-only mode
Display decisions without allowing edits:Simulator integration
Add a simulator panel to test decisions directly in the editor. You can evaluate rules via your backend API or entirely in the browser using WASM.- API (Backend)
- WASM (Browser-only)
Call your backend to evaluate the decision:
Standalone components
Use individual editor components outside of the decision graph for custom integrations.Code editor
TheCodeEditor component provides standalone expression editing with syntax highlighting and validation:
Editor types
| Type | Use case |
|---|---|
standard | General expressions that return a value |
unary | Boolean conditions for decision table cells |
template | String templates with {expression} interpolation |
Type hints
PassvariableType and expectedVariableType to enable type checking and improved autocomplete. Types use the VariableTypeJson format:
| Type | Description |
|---|---|
'Any' | Any value |
'Null' | Null value |
'Bool' | Boolean |
'String' | String |
'Number' | Number |
{ Const: string } | Constant string value |
{ Enum: [label, values] } | Enumeration with optional label |
{ Array: VariableTypeJson } | Array of a specific type |
{ Object: Record<string, VariableTypeJson> } | Object with typed fields |
Decision table
TheDecisionTable component renders a standalone spreadsheet-style table editor:
Schema-driven autocomplete
PassinputsSchema and outputsSchema to provide field suggestions in the expression editor:
Permission levels
Control editing capabilities with thepermission prop:
| Permission | Description |
|---|---|
edit:full | Full editing capabilities (default) |
edit:rules | Edit rule values only, cannot add/remove columns |
edit:values | Edit cell values only, cannot modify structure |