Skip to content

DSL reference

The quick lookup surface: one line and a minimal snippet per construct. For rules, edge cases and worked examples, follow the links into the specification.

ConstructWhat it gives you
entitiestables + CRUD UI + a generated data layer & API
field / relation attributesuniqueness, layout, read-only, dropdown filtering, cascades
functionan explicit presentation role (Document, Setting, ...)
labela stored, read-only display name for lookups
numbera platform-numbered, gap-free document field
checkscross-field / cross-line validations
immutableWhen / immutablereject user writes in a status / append-only
hierarchy / leafOnlytree entities, leaf-only references
calculated fieldsserver + UI-evaluated expressions, date helpers, call-outs
relations / compositionassociations and master-detail compositions
usesreuse entities owned by another intent model
processesworkflows: user tasks, decisions, waits, boundary timers
formstask data-entry pages
actionsdeveloper-defined buttons opening custom pages
viewcalendar / range / slot-booking pages
documentItemsLayout: chatrender a document's items as a chat thread
reportsaggregations, charts, dashboard KPI tiles, balance reports
widgetscustom KPI / embedded-page dashboard tiles
notificationsemail on create / update / delete
schedulescron: notify or generate records per matching row
integrationsoutbound HTTP on a data change
inbounda webhook that creates records
rollupscounts, sums, balance + status maintenance
settlementsauto-allocation of payments across open invoices
expansionsgenerated child rows per day / week / month
generatesone-click document-from-document cloning
transitionsguarded on-demand status flips (void / cancel / reopen)
postingsdeclarative source-document to balanced-document posting
personal / partnerper-user and per-partner row-scoped surfaces
seedsinitial data, CSV-backed sets, translations
multilingual / languagestranslation tables + read-time translation overlay
permissionsroles

Snippets

entities

yaml
entities:
  - name: Member
    icon: user
    group: master-data
    audit: true
    fields:
      - { name: id,   type: integer, primaryKey: true, generated: true }
      - { name: name, type: string,  required: true, length: 200 }
    relations:
      - { name: loans, kind: oneToMany, to: Loan }

field / relation attributes

yaml
- { name: code,    type: string, unique: true, length: 30 }
- { name: total,   type: decimal, precision: 18, scale: 2, readOnly: true }
- { name: period,  type: month }
- { name: Number,  type: string, number: { series: SalesInvoice, format: "SI-{seq:06}" } }
- { name: Status,  kind: manyToOne, to: OrderStatus, function: EntityStatus, init: 1 }
- { name: City,    kind: manyToOne, to: City, dependsOn: { relation: Country, filterBy: Country } }
- { name: Product, kind: manyToOne, to: Product, where: { Type: 1 } }

function

yaml
- name: ProjectTimesheet
  function: Document           # header + line items + status pill + totals
- name: EmployeeTimesheet
  function: DocumentItem

checks

yaml
- name: JournalEntry
  checks:
    - { kind: itemsMin,      count: 1, status: 2, message: "An entry needs at least one line" }
    - { kind: itemsSumEqual, over: [debit, credit], status: 2, message: "Debits must equal credits" }
- name: JournalEntryItem
  checks:
    - { kind: exactlyOne, fields: [debit, credit], message: "Exactly one of debit / credit" }

processes

yaml
processes:
  - name: OrderApproval
    trigger: { onCreate: Order }
    steps:
      - { name: review,   kind: userTask,    args: { assignee: manager, form: ApproveOrder } }
      - { name: decide,   kind: decision,    args: { if: "action == 'approve'", then: activate, else: cancel } }
      - { name: activate, kind: serviceTask, args: { setRelationField: Status, value: 2, next: end } }
      - { name: cancel,   kind: serviceTask, args: { setRelationField: Status, value: 3, next: end } }
      - { name: end,      kind: end }

reports

yaml
reports:
  - name: OrdersByMonth
    source: Order
    dimensions: ["month(orderDate)"]
    measures: ["count(*)", "sum(total)"]
    filter: "total > 0"
    chart: bar
    widget: { value: "sum(total)", at: { "month(orderDate)": now }, label: Revenue (this month) }

generates / transitions

yaml
generates:
  - { name: invoice-from-order, from: Order, to: Invoice, map: { Customer: Customer }, sourceStatus: 3 }

transitions:
  - { name: VoidInvoice, forEntity: Invoice, from: [3, 4], setStatus: 8, when: "Paid == 0", label: Void, icon: ban }

seeds

yaml
seeds:
  - name: statuses
    entity: OrderStatus
    rows:
      - { id: 1, name: DRAFT }
      - { id: 2, name: POSTED }
  - name: countries
    entity: Country
    file: data/countries.csv

Planned — recognised but not yet implemented

The following are parsed (or reserved) but not yet materialised by a generator; a conforming tool rejects or ignores them with a clear message rather than failing obscurely:

  • Reserved function values for upcoming presentations (Board, Gantt, Timeline).
  • manyToMany — parsed but never materialised; the supported shape is the explicit intermediate entity.
  • Cross-model schedule source — a schedule's entity must be local (the generate target may be cross-model).
  • Event-driven document generation (produce a document on an event), a declarative state machine, and shadow audit-history entities (audit columns via audit: true ship today).
  • Arbitrary resolver-path task assignment beyond assignee: personal.

Released under the Apache License 2.0.